org.keycloak.models

## Interface KeyManager

- All Known Implementing Classes:
    DefaultKeyManager

      public interface KeyManager

  Author:
    Stian Thorgersen

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static class` | `KeyManager.ActiveAesKey`
    `static class` | `KeyManager.ActiveHmacKey`
    `static class` | `KeyManager.ActiveRsaKey`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `KeyManager.ActiveAesKey` | `getActiveAesKey(RealmModel realm)` Deprecated.
    `KeyManager.ActiveHmacKey` | `getActiveHmacKey(RealmModel realm)` Deprecated.
    `KeyWrapper` | `getActiveKey(RealmModel realm, KeyUse use, String algorithm)`
    `KeyManager.ActiveRsaKey` | `getActiveRsaKey(RealmModel realm)` Deprecated.
    `List<SecretKeyMetadata>` | `getAesKeys(RealmModel realm)` Deprecated.
    `SecretKey` | `getAesSecretKey(RealmModel realm, String kid)` Deprecated.
    `List<SecretKeyMetadata>` | `getHmacKeys(RealmModel realm)` Deprecated.
    `SecretKey` | `getHmacSecretKey(RealmModel realm, String kid)` Deprecated.
    `KeyWrapper` | `getKey(RealmModel realm, String kid, KeyUse use, String algorithm)`
    `default List<KeyWrapper>` | `getKeys(RealmModel realm)` Deprecated. Use `getKeysStream` instead.
    `default List<KeyWrapper>` | `getKeys(RealmModel realm, KeyUse use, String algorithm)` Deprecated. Use `getKeysStream` instead.
    `Stream<KeyWrapper>` | `getKeysStream(RealmModel realm)` Returns all `KeyWrapper` for the given realm.
    `Stream<KeyWrapper>` | `getKeysStream(RealmModel realm, KeyUse use, String algorithm)` Returns all `KeyWrapper` for the given realm that match given criteria.
    `Certificate` | `getRsaCertificate(RealmModel realm, String kid)` Deprecated.
    `List<RsaKeyMetadata>` | `getRsaKeys(RealmModel realm)` Deprecated.
    `PublicKey` | `getRsaPublicKey(RealmModel realm, String kid)` Deprecated.

- - ### Method Detail

    - #### getActiveKey

          KeyWrapper getActiveKey(RealmModel realm,
                                  KeyUse use,
                                  String algorithm)

    - #### getKey

          KeyWrapper getKey(RealmModel realm,
                            String kid,
                            KeyUse use,
                            String algorithm)

    - #### getKeys

          @Deprecated
          default List<KeyWrapper> getKeys(RealmModel realm)

      Deprecated. Use `getKeysStream` instead.
      Returns all `KeyWrapper` for the given realm.
      Parameters:
        `realm` - `RealmModel`.
      Returns:
        List of all `KeyWrapper` in the realm.

    - #### getKeysStream

          Stream<KeyWrapper> getKeysStream(RealmModel realm)

      Returns all `KeyWrapper` for the given realm.
      Parameters:
        `realm` - `RealmModel`.
      Returns:
        Stream of all `KeyWrapper` in the realm.

    - #### getKeys

          @Deprecated
          default List<KeyWrapper> getKeys(RealmModel realm,
                                                       KeyUse use,
                                                       String algorithm)

      Deprecated. Use `getKeysStream` instead.
      Returns all `KeyWrapper` for the given realm that match given criteria.
      Parameters:
        `realm` - `RealmModel`.
        `use` - `KeyUse`.
        `algorithm` - `String`.
      Returns:
        List of all `KeyWrapper` in the realm.

    - #### getKeysStream

          Stream<KeyWrapper> getKeysStream(RealmModel realm,
                                           KeyUse use,
                                           String algorithm)

      Returns all `KeyWrapper` for the given realm that match given criteria.
      Parameters:
        `realm` - `RealmModel`.
        `use` - `KeyUse`.
        `algorithm` - `String`.
      Returns:
        Stream of all `KeyWrapper` in the realm.

    - #### getActiveRsaKey

          @Deprecated
          KeyManager.ActiveRsaKey getActiveRsaKey(RealmModel realm)

      Deprecated.

    - #### getRsaPublicKey

          @Deprecated
          PublicKey getRsaPublicKey(RealmModel realm,
                                                String kid)

      Deprecated.

    - #### getRsaCertificate

          @Deprecated
          Certificate getRsaCertificate(RealmModel realm,
                                                    String kid)

      Deprecated.

    - #### getRsaKeys

          @Deprecated
          List<RsaKeyMetadata> getRsaKeys(RealmModel realm)

      Deprecated.

    - #### getActiveHmacKey

          @Deprecated
          KeyManager.ActiveHmacKey getActiveHmacKey(RealmModel realm)

      Deprecated.

    - #### getHmacSecretKey

          @Deprecated
          SecretKey getHmacSecretKey(RealmModel realm,
                                                 String kid)

      Deprecated.

    - #### getHmacKeys

          @Deprecated
          List<SecretKeyMetadata> getHmacKeys(RealmModel realm)

      Deprecated.

    - #### getActiveAesKey

          @Deprecated
          KeyManager.ActiveAesKey getActiveAesKey(RealmModel realm)

      Deprecated.

    - #### getAesSecretKey

          @Deprecated
          SecretKey getAesSecretKey(RealmModel realm,
                                                String kid)

      Deprecated.

    - #### getAesKeys

          @Deprecated
          List<SecretKeyMetadata> getAesKeys(RealmModel realm)

      Deprecated.

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