org.keycloak.keys

## Interface PublicKeyStorageProvider

- All Superinterfaces:
    Provider
  All Known Implementing Classes:
    InfinispanPublicKeyStorageProvider

      public interface PublicKeyStorageProvider
      extends Provider

  Author:
    Marek Posolda

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clearCache()` Clears all the cached public keys, so they need to be loaded again
    `KeyWrapper` | `getFirstPublicKey(String modelKey, String algorithm, PublicKeyLoader loader)` Get first found public key to verify messages signed by particular client having several public keys.
    `KeyWrapper` | `getPublicKey(String modelKey, String kid, PublicKeyLoader loader)` Get public key to verify messages signed by particular client.

    - ### Methods inherited from interface org.keycloak.provider.Provider

      `close`

- - ### Method Detail

    - #### getPublicKey

          KeyWrapper getPublicKey(String modelKey,
                                  String kid,
                                  PublicKeyLoader loader)

      Get public key to verify messages signed by particular client. Used for example during JWT client authentication
      Parameters:
        `modelKey` -
        `kid` -
        `loader` -
      Returns:

    - #### getFirstPublicKey

          KeyWrapper getFirstPublicKey(String modelKey,
                                       String algorithm,
                                       PublicKeyLoader loader)

      Get first found public key to verify messages signed by particular client having several public keys. Used for example during JWT client authentication or to encrypt content encryption key (CEK) by particular client. Used for example during encrypting a token in JWE
      Parameters:
        `modelKey` -
        `algorithm` -
        `loader` -
      Returns:

    - #### clearCache

          void clearCache()

      Clears all the cached public keys, so they need to be loaded again

Copyright © 2021 JBoss by Red Hat. All rights reserved.