Package com.nimbusds.oauth2.sdk.dpop
Class JWKThumbprintConfirmation
- java.lang.Object
-
- com.nimbusds.oauth2.sdk.cnf.AbstractConfirmation
-
- com.nimbusds.oauth2.sdk.dpop.JWKThumbprintConfirmation
-
@Immutable public final class JWKThumbprintConfirmation extends AbstractConfirmation
JSON Web Key (JWK) SHA-256 thumbprint confirmation.
-
-
Constructor Summary
Constructors Constructor Description JWKThumbprintConfirmation(com.nimbusds.jose.util.Base64URL jkt)
Creates a new JWK SHA-256 thumbprint.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
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.Map.Entry<String,net.minidev.json.JSONObject>
toJWTClaim()
Returns this confirmation as a JWT claim.-
Methods inherited from class com.nimbusds.oauth2.sdk.cnf.AbstractConfirmation
applyTo, mergeInto, parseConfirmationJSONObject, toJSONObject, toString
-
-
-
-
Constructor Detail
-
JWKThumbprintConfirmation
public JWKThumbprintConfirmation(com.nimbusds.jose.util.Base64URL jkt)
Creates a new JWK SHA-256 thumbprint.- Parameters:
jkt
- The JWK SHA-256 thumbprint. Must not benull
.
-
-
Method Detail
-
getValue
public com.nimbusds.jose.util.Base64URL getValue()
Returns the JWK SHA-256 thumbprint.- Returns:
- The JWK SHA-256 thumbprint.
-
toJWTClaim
public Map.Entry<String,net.minidev.json.JSONObject> toJWTClaim()
Description copied from class:AbstractConfirmation
Returns this confirmation as a JWT claim.Example:
"cnf" : { "x5t#S256" : "bwcK0esc3ACC3DB2Y5_lESsXE8o9ltc05O89jdN-dg2" }
- Specified by:
toJWTClaim
in classAbstractConfirmation
- Returns:
- The JWT claim name / value.
-
parse
public static JWKThumbprintConfirmation parse(com.nimbusds.jwt.JWTClaimsSet jwtClaimsSet)
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
public 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.- 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.
-
-