Package com.nimbusds.jose.jwk
Class ThumbprintURI
- java.lang.Object
-
- com.nimbusds.jose.jwk.ThumbprintURI
-
@Immutable public class ThumbprintURI extends Object
JSON Web Key (JWK) thumbprint URI.See draft-ietf-oauth-jwk-thumbprint-uri
- Version:
- 2022-01-30
- Author:
- Vladimir Dzhuvinov
-
-
Constructor Summary
Constructors Constructor Description ThumbprintURI(Base64URL thumbprint)Creates a new JWK thumbprint URI.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ThumbprintURIcompute(JWK jwk)Computes the SHA-256 JWK thumbprint URI for the specified JWK.booleanequals(Object o)Base64URLgetThumbprint()Returns the underlying thumbprint value.inthashCode()static ThumbprintURIparse(String s)Parses a JWK thumbprint URI from the specified URI string.static ThumbprintURIparse(URI uri)Parses a JWK thumbprint URI from the specified URI.StringtoString()URItoURI()Returns theURIrepresentation.
-
-
-
Field Detail
-
PREFIX
public static final String PREFIX
The URI prefix of JWK thumbprints.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ThumbprintURI
public ThumbprintURI(Base64URL thumbprint)
Creates a new JWK thumbprint URI.- Parameters:
thumbprint- the thumbprint value. Must not benull.
-
-
Method Detail
-
getThumbprint
public Base64URL getThumbprint()
Returns the underlying thumbprint value.- Returns:
- The thumbprint value.
-
compute
public static ThumbprintURI compute(JWK jwk) throws JOSEException
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
public static ThumbprintURI parse(URI uri) throws ParseException
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
public static ThumbprintURI parse(String s) throws ParseException
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.
-
-