Package org.keycloak.crypto
Class KeyWrapper
- java.lang.Object
- 
- org.keycloak.crypto.KeyWrapper
 
- 
 public class KeyWrapper extends Object 
- 
- 
Constructor SummaryConstructors Constructor Description KeyWrapper()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description KeyWrappercloneKey()StringgetAlgorithm()Returns the value of the optionalalgclaim.StringgetAlgorithmOrDefault()Returns the value of the optionalalgclaim.X509CertificategetCertificate()List<X509Certificate>getCertificateChain()StringgetKid()KeygetPrivateKey()StringgetProviderId()longgetProviderPriority()KeygetPublicKey()SecretKeygetSecretKey()KeyStatusgetStatus()StringgetType()KeyUsegetUse()voidsetAlgorithm(String algorithm)voidsetCertificate(X509Certificate certificate)voidsetCertificateChain(List<X509Certificate> certificateChain)voidsetKid(String kid)voidsetPrivateKey(Key privateKey)voidsetProviderId(String providerId)voidsetProviderPriority(long providerPriority)voidsetPublicKey(Key publicKey)voidsetSecretKey(SecretKey secretKey)voidsetStatus(KeyStatus status)voidsetType(String type)voidsetUse(KeyUse use)
 
- 
- 
- 
Method Detail- 
getProviderIdpublic String getProviderId() 
 - 
setProviderIdpublic void setProviderId(String providerId) 
 - 
getProviderPrioritypublic long getProviderPriority() 
 - 
setProviderPrioritypublic void setProviderPriority(long providerPriority) 
 - 
getKidpublic String getKid() 
 - 
setKidpublic void setKid(String kid) 
 - 
getAlgorithmpublic String getAlgorithm() Returns the value of the optional algclaim.- Returns:
- the algorithm value
 
 - 
getAlgorithmOrDefaultpublic String getAlgorithmOrDefault() Returns the value of the optional algclaim. If not defined, a default is returned depending on the key type as perktyclaim.For keys of type KeyType.RSA, the default algorithm isAlgorithm.RS256as this is the default algorithm recommended by OIDC specs.- Returns:
- the algorithm set or a default based on the key type.
 
 - 
setAlgorithmpublic void setAlgorithm(String algorithm) 
 - 
getTypepublic String getType() 
 - 
setTypepublic void setType(String type) 
 - 
getUsepublic KeyUse getUse() 
 - 
setUsepublic void setUse(KeyUse use) 
 - 
getStatuspublic KeyStatus getStatus() 
 - 
setStatuspublic void setStatus(KeyStatus status) 
 - 
getSecretKeypublic SecretKey getSecretKey() 
 - 
setSecretKeypublic void setSecretKey(SecretKey secretKey) 
 - 
getPrivateKeypublic Key getPrivateKey() 
 - 
setPrivateKeypublic void setPrivateKey(Key privateKey) 
 - 
getPublicKeypublic Key getPublicKey() 
 - 
setPublicKeypublic void setPublicKey(Key publicKey) 
 - 
getCertificatepublic X509Certificate getCertificate() 
 - 
setCertificatepublic void setCertificate(X509Certificate certificate) 
 - 
getCertificateChainpublic List<X509Certificate> getCertificateChain() 
 - 
setCertificateChainpublic void setCertificateChain(List<X509Certificate> certificateChain) 
 - 
cloneKeypublic KeyWrapper cloneKey() 
 
- 
 
-