Package org.keycloak.jose.jwk
Class JWK
java.lang.Object
org.keycloak.jose.jwk.JWK
- Direct Known Subclasses:
ECPublicJWK
,OKPPublicJWK
,RSAPublicJWK
- Author:
- Stian Thorgersen
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetKeyId()
<T> T
getOtherClaim
(String claimName, Class<T> claimType) Ability to retrieve custom claims in a unified way.String[]
void
setAlgorithm
(String algorithm) void
void
setKeyType
(String keyType) void
setOtherClaims
(String name, Object value) void
setPublicKeyUse
(String publicKeyUse) void
setSha1x509Thumbprint
(String sha1x509Thumbprint) void
setSha256x509Thumbprint
(String sha256x509Thumbprint) void
setX509CertificateChain
(String[] x509CertificateChain)
-
Field Details
-
KEY_ID
- See Also:
-
KEY_TYPE
- See Also:
-
ALGORITHM
- See Also:
-
PUBLIC_KEY_USE
- See Also:
-
X5C
- See Also:
-
SHA1_509_THUMBPRINT
- See Also:
-
SHA256_509_THUMBPRINT
- See Also:
-
otherClaims
-
-
Constructor Details
-
JWK
public JWK()
-
-
Method Details
-
getKeyId
-
setKeyId
-
getKeyType
-
setKeyType
-
getAlgorithm
-
setAlgorithm
-
getPublicKeyUse
-
setPublicKeyUse
-
getX509CertificateChain
-
setX509CertificateChain
-
getSha1x509Thumbprint
-
setSha1x509Thumbprint
-
getSha256x509Thumbprint
-
setSha256x509Thumbprint
-
getOtherClaims
-
setOtherClaims
-
getOtherClaim
Ability to retrieve custom claims in a unified way. The subclasses (like for example OKPublicJWK) may contain the custom claims as Java properties when the "JWK" class can contain the same claims inside the "otherClaims" map. This method allows to obtain the claim in both ways regardless of if we have "JWK" class or some of it's subclass- Parameters:
claimName
- claim nameclaimType
- claim type- Returns:
- claim if present or null
-