Package org.keycloak.keys
Class DefaultKeyManager
- java.lang.Object
-
- org.keycloak.keys.DefaultKeyManager
-
- All Implemented Interfaces:
KeyManager
public class DefaultKeyManager extends Object implements KeyManager
- Author:
- Stian Thorgersen
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.keycloak.models.KeyManager
KeyManager.ActiveAesKey, KeyManager.ActiveHmacKey, KeyManager.ActiveRsaKey
-
-
Constructor Summary
Constructors Constructor Description DefaultKeyManager(KeycloakSession session)
-
Method Summary
-
-
-
Constructor Detail
-
DefaultKeyManager
public DefaultKeyManager(KeycloakSession session)
-
-
Method Detail
-
getActiveKey
public KeyWrapper getActiveKey(RealmModel realm, KeyUse use, String algorithm)
- Specified by:
getActiveKey
in interfaceKeyManager
-
getKey
public KeyWrapper getKey(RealmModel realm, String kid, KeyUse use, String algorithm)
- Specified by:
getKey
in interfaceKeyManager
-
getKeysStream
public Stream<KeyWrapper> getKeysStream(RealmModel realm, KeyUse use, String algorithm)
Description copied from interface:KeyManager
Returns allKeyWrapper
for the given realm that match given criteria.- Specified by:
getKeysStream
in interfaceKeyManager
- Parameters:
realm
-RealmModel
.use
-KeyUse
.algorithm
-String
.- Returns:
- Stream of all
KeyWrapper
in the realm. Never returnsnull
.
-
getKeysStream
public Stream<KeyWrapper> getKeysStream(RealmModel realm)
Description copied from interface:KeyManager
Returns allKeyWrapper
for the given realm.- Specified by:
getKeysStream
in interfaceKeyManager
- Parameters:
realm
-RealmModel
.- Returns:
- Stream of all
KeyWrapper
in the realm. Never returnsnull
.
-
getActiveRsaKey
@Deprecated public KeyManager.ActiveRsaKey getActiveRsaKey(RealmModel realm)
Deprecated.- Specified by:
getActiveRsaKey
in interfaceKeyManager
-
getActiveHmacKey
@Deprecated public KeyManager.ActiveHmacKey getActiveHmacKey(RealmModel realm)
Deprecated.- Specified by:
getActiveHmacKey
in interfaceKeyManager
-
getActiveAesKey
@Deprecated public KeyManager.ActiveAesKey getActiveAesKey(RealmModel realm)
Deprecated.- Specified by:
getActiveAesKey
in interfaceKeyManager
-
getRsaPublicKey
@Deprecated public PublicKey getRsaPublicKey(RealmModel realm, String kid)
Deprecated.- Specified by:
getRsaPublicKey
in interfaceKeyManager
-
getRsaCertificate
@Deprecated public Certificate getRsaCertificate(RealmModel realm, String kid)
Deprecated.- Specified by:
getRsaCertificate
in interfaceKeyManager
-
getHmacSecretKey
@Deprecated public SecretKey getHmacSecretKey(RealmModel realm, String kid)
Deprecated.- Specified by:
getHmacSecretKey
in interfaceKeyManager
-
getAesSecretKey
@Deprecated public SecretKey getAesSecretKey(RealmModel realm, String kid)
Deprecated.- Specified by:
getAesSecretKey
in interfaceKeyManager
-
getRsaKeys
@Deprecated public List<RsaKeyMetadata> getRsaKeys(RealmModel realm)
Deprecated.- Specified by:
getRsaKeys
in interfaceKeyManager
-
getHmacKeys
public List<SecretKeyMetadata> getHmacKeys(RealmModel realm)
- Specified by:
getHmacKeys
in interfaceKeyManager
-
getAesKeys
public List<SecretKeyMetadata> getAesKeys(RealmModel realm)
- Specified by:
getAesKeys
in interfaceKeyManager
-
-