org.keycloak.rotation

## Interface KeyLocator

- All Known Implementing Classes:
    CompositeKeyLocator, HardcodedKeyLocator

      public interface KeyLocator

  This interface defines a method for obtaining a security key by ID.

  If the `KeyLocator` implementor wants to make all its keys available for iteration, it should implement `Iterable`<`T extends` `Key`> interface. The base `KeyLocator` does not extend this interface to enable `KeyLocators` that do not support listing their keys.

  Author:
    Hynek Mlnařík

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `Key` | `getKey(String kid)` Returns a key with a particular ID.
    `void` | `refreshKeyCache()` If this key locator caches keys in any way, forces this cache cleanup and refreshing the keys.

- - ### Method Detail

    - #### getKey

          Key getKey(String kid)
              throws KeyManagementException

      Returns a key with a particular ID.
      Parameters:
        `kid` - Key ID
        `configuration` - Configuration
      Returns:
        key, which should be used for verify signature on given "input"
      Throws:
        `KeyManagementException`

    - #### refreshKeyCache

          void refreshKeyCache()

      If this key locator caches keys in any way, forces this cache cleanup and refreshing the keys.

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