Package org.keycloak.crypto
Class KeyWrapper
java.lang.Object
org.keycloak.crypto.KeyWrapper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncloneKey()Returns the value of the optionalalgclaim.Returns the value of the optionalalgclaim.getCurve()getKid()longgetType()getUse()booleanvoidsetAlgorithm(String algorithm) voidsetCertificate(X509Certificate certificate) voidsetCertificateChain(List<X509Certificate> certificateChain) voidvoidsetIsDefaultClientCertificate(boolean isDefaultClientCertificate) voidvoidsetPrivateKey(Key privateKey) voidsetProviderId(String providerId) voidsetProviderPriority(long providerPriority) voidsetPublicKey(Key publicKey) voidsetSecretKey(SecretKey secretKey) voidvoidvoid
-
Constructor Details
-
KeyWrapper
public KeyWrapper()
-
-
Method Details
-
getProviderId
-
setProviderId
-
getProviderPriority
public long getProviderPriority() -
setProviderPriority
public void setProviderPriority(long providerPriority) -
getKid
-
setKid
-
getAlgorithm
Returns the value of the optional
algclaim.- Returns:
- the algorithm value
-
getAlgorithmOrDefault
Returns the value of the optional
algclaim. If not defined, a default is inferred for some algorithms.For keys of type
KeyType.RSA, the default algorithm isAlgorithm.RS256as this is the default algorithm recommended by OIDC specs.For keys of type
KeyType.EC,Algorithm.ES256,Algorithm.ES384, orAlgorithm.ES512is returned based on the curve- Returns:
- the algorithm set or a default based on the key type.
-
setAlgorithm
-
getType
-
setType
-
getUse
-
setUse
-
getStatus
-
setStatus
-
getSecretKey
-
setSecretKey
-
getPrivateKey
-
setPrivateKey
-
getPublicKey
-
setPublicKey
-
getCertificate
-
setCertificate
-
getCertificateChain
-
setCertificateChain
-
isDefaultClientCertificate
public boolean isDefaultClientCertificate() -
setIsDefaultClientCertificate
public void setIsDefaultClientCertificate(boolean isDefaultClientCertificate) -
setCurve
-
getCurve
-
cloneKey
-