Package org.keycloak.crypto
Class KeyWrapper
java.lang.Object
org.keycloak.crypto.KeyWrapper
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncloneKey()
Returns the value of the optionalalg
claim.Returns the value of the optionalalg
claim.getKid()
long
getType()
getUse()
boolean
void
setAlgorithm
(String algorithm) void
setCertificate
(X509Certificate certificate) void
setCertificateChain
(List<X509Certificate> certificateChain) void
setIsDefaultClientCertificate
(boolean isDefaultClientCertificate) void
void
setPrivateKey
(Key privateKey) void
setProviderId
(String providerId) void
setProviderPriority
(long providerPriority) void
setPublicKey
(Key publicKey) void
setSecretKey
(SecretKey secretKey) void
void
void
-
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
alg
claim.- Returns:
- the algorithm value
-
getAlgorithmOrDefault
Returns the value of the optional
alg
claim. If not defined, a default is returned depending on the key type as perkty
claim.For keys of type
KeyType.RSA
, the default algorithm isAlgorithm.RS256
as this is the default algorithm recommended by OIDC specs.- 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) -
cloneKey
-