Package com.nimbusds.jose.jwk
Class ThumbprintURI
java.lang.Object
com.nimbusds.jose.jwk.ThumbprintURI
JSON Web Key (JWK) thumbprint URI.
Example SHA-256 thumbprint URI:
urn:ietf:params:oauth:jwk-thumbprint:sha-256:NzbLsXh8uDCcd-6MNwXF4W_7noWXFZAfHkxZsRGC9Xs
See draft-ietf-oauth-jwk-thumbprint-uri-01
- Version:
- 2024-04-20
- Author:
- Vladimir Dzhuvinov
-
Field Summary
-
Constructor Summary
ConstructorDescriptionThumbprintURI
(String hashAlg, Base64URL thumbprint) Creates a new JWK thumbprint URI. -
Method Summary
Modifier and TypeMethodDescriptionstatic ThumbprintURI
Computes the SHA-256 JWK thumbprint URI for the specified JWK.boolean
Returns the hash algorithm string.Returns the underlying thumbprint value.int
hashCode()
static ThumbprintURI
Parses a JWK thumbprint URI from the specified URI string.static ThumbprintURI
Parses a JWK thumbprint URI from the specified URI.toString()
toURI()
Returns theURI
representation.
-
Field Details
-
PREFIX
The URI prefix of JWK thumbprints.- See Also:
-
-
Constructor Details
-
ThumbprintURI
Creates a new JWK thumbprint URI.- Parameters:
hashAlg
- The hash algorithm. Must not benull
.thumbprint
- The thumbprint value. Must not benull
.
-
-
Method Details
-
getAlgorithmString
Returns the hash algorithm string.- Returns:
- The hash algorithm string.
-
getThumbprint
Returns the underlying thumbprint value.- Returns:
- The thumbprint value.
-
toURI
Returns theURI
representation.- Returns:
- The
URI
representation.
-
toString
-
equals
-
hashCode
-
compute
Computes the SHA-256 JWK thumbprint URI for the specified JWK.- Parameters:
jwk
- The JWK. Must not benull
.- Returns:
- The SHA-256 JWK thumbprint URI.
- Throws:
JOSEException
- If the SHA-256 hash algorithm is not supported.
-
parse
Parses a JWK thumbprint URI from the specified URI.- Parameters:
uri
- The URI. Must not benull
.- Returns:
- The JWK thumbprint URI.
- Throws:
ParseException
- If the URI is illegal.
-
parse
Parses a JWK thumbprint URI from the specified URI string.- Parameters:
s
- The URI string. Must not benull
.- Returns:
- The JWK thumbprint URI.
- Throws:
ParseException
- If the URI string is illegal.
-