Package com.nimbusds.oauth2.sdk.dpop
Class JWKThumbprintConfirmation
java.lang.Object
com.nimbusds.oauth2.sdk.dpop.JWKThumbprintConfirmation
JSON Web Key (JWK) SHA-256 thumbprint confirmation.
-
Constructor Summary
ConstructorsConstructorDescriptionJWKThumbprintConfirmation
(com.nimbusds.jose.util.Base64URL jkt) Creates a new JWK SHA-256 thumbprint. -
Method Summary
Modifier and TypeMethodDescriptioncom.nimbusds.jwt.JWTClaimsSet
applyTo
(com.nimbusds.jwt.JWTClaimsSet jwtClaimsSet) Applies this JWK SHA-256 thumbprint confirmation to the specified JWT claims set.boolean
com.nimbusds.jose.util.Base64URL
getValue()
Returns the JWK SHA-256 thumbprint.int
hashCode()
static JWKThumbprintConfirmation
of
(com.nimbusds.jose.jwk.JWK jwk) Creates a confirmation of the specified JWK.static JWKThumbprintConfirmation
parse
(com.nimbusds.jwt.JWTClaimsSet jwtClaimsSet) Parses a JWK SHA-256 thumbprint confirmation from the specified JWT claims set.static JWKThumbprintConfirmation
parse
(net.minidev.json.JSONObject jsonObject) Parses a JWK SHA-256 thumbprint confirmation from the specified JSON object representation of a JWT claims set.static JWKThumbprintConfirmation
parseFromConfirmationJSONObject
(net.minidev.json.JSONObject cnf) Parses a JWK SHA-256 thumbprint confirmation from the specified confirmation ("cnf") JSON object.net.minidev.json.JSONObject
Returns this JWK SHA-256 thumbprint confirmation as a JSON object.Returns this JWK SHA-256 thumbprint confirmation as a JWT claim.toString()
-
Constructor Details
-
JWKThumbprintConfirmation
Creates a new JWK SHA-256 thumbprint.- Parameters:
jkt
- The JWK SHA-256 thumbprint. Must not benull
.
-
-
Method Details
-
getValue
Returns the JWK SHA-256 thumbprint.- Returns:
- The JWK SHA-256 thumbprint.
-
toJSONObject
Returns this JWK SHA-256 thumbprint confirmation as a JSON object.Example:
{ "cnf" : { "jkt" : "0ZcOCORZNYy-DWpqq30jZyJGHTN0d2HglBV3uiguA4I" } }
- Returns:
- The JSON object.
-
toJWTClaim
Returns this JWK SHA-256 thumbprint confirmation as a JWT claim.Example:
"cnf" : { "jkt" : "0ZcOCORZNYy-DWpqq30jZyJGHTN0d2HglBV3uiguA4I" }
- Returns:
- The JWT claim name / value.
-
applyTo
Applies this JWK SHA-256 thumbprint confirmation to the specified JWT claims set.- Parameters:
jwtClaimsSet
- The JWT claims set.- Returns:
- The modified JWT claims set.
-
toString
-
equals
-
hashCode
-
parse
Parses a JWK SHA-256 thumbprint confirmation from the specified JWT claims set.- Parameters:
jwtClaimsSet
- The JWT claims set.- Returns:
- The JWK SHA-256 thumbprint confirmation,
null
if not found.
-
parse
Parses a JWK SHA-256 thumbprint confirmation from the specified JSON object representation of a JWT claims set.- Parameters:
jsonObject
- The JSON object.- Returns:
- The JWK SHA-256 thumbprint confirmation,
null
if not found.
-
parseFromConfirmationJSONObject
public static JWKThumbprintConfirmation parseFromConfirmationJSONObject(net.minidev.json.JSONObject cnf) Parses a JWK SHA-256 thumbprint confirmation from the specified confirmation ("cnf") JSON object.- Parameters:
cnf
- The confirmation JSON object,null
if none.- Returns:
- The JWK SHA-256 thumbprint confirmation,
null
if not found.
-
of
public static JWKThumbprintConfirmation of(com.nimbusds.jose.jwk.JWK jwk) throws com.nimbusds.jose.JOSEException Creates a confirmation of the specified JWK.- Parameters:
jwk
- The JWK.- Returns:
- The JWK SHA-256 thumbprint confirmation.
- Throws:
com.nimbusds.jose.JOSEException
- If the thumbprint computation failed.
-