Package com.nimbusds.oauth2.sdk.cnf
Class AbstractConfirmation
java.lang.Object
com.nimbusds.oauth2.sdk.cnf.AbstractConfirmation
- Direct Known Subclasses:
JWKThumbprintConfirmation
,X509CertificateConfirmation
Abstract confirmation.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.nimbusds.jwt.JWTClaimsSet
applyTo
(com.nimbusds.jwt.JWTClaimsSet jwtClaimsSet) Applies this confirmation to the specified JWT claims set.void
mergeInto
(net.minidev.json.JSONObject jsonObject) Merges this X.509 certificate SHA-256 confirmation into the specified JSON object.protected static net.minidev.json.JSONObject
parseConfirmationJSONObject
(com.nimbusds.jwt.JWTClaimsSet jwtClaimsSet) Parses a confirmation JSON object from the specified JWT claims set.net.minidev.json.JSONObject
Returns this X.509 certificate SHA-256 confirmation as a JSON object.Returns this confirmation as a JWT claim.toString()
-
Constructor Details
-
AbstractConfirmation
public AbstractConfirmation()
-
-
Method Details
-
toJWTClaim
Returns this confirmation as a JWT claim.Example:
"cnf" : { "x5t#S256" : "bwcK0esc3ACC3DB2Y5_lESsXE8o9ltc05O89jdN-dg2" }
- Returns:
- The JWT claim name / value.
-
toJSONObject
Returns this X.509 certificate SHA-256 confirmation as a JSON object.Example:
{ "cnf" : { "x5t#S256" : "bwcK0esc3ACC3DB2Y5_lESsXE8o9ltc05O89jdN-dg2" } }
- Returns:
- The JSON object.
-
mergeInto
Merges this X.509 certificate SHA-256 confirmation into the specified JSON object. Any existingcnf
JSON object values will be preserved.Example:
{ "cnf" : { "x5t#S256" : "bwcK0esc3ACC3DB2Y5_lESsXE8o9ltc05O89jdN-dg2" } }
- Parameters:
jsonObject
- The JSON object. Must not benull
.
-
applyTo
Applies this confirmation to the specified JWT claims set.- Parameters:
jwtClaimsSet
- The JWT claims set.- Returns:
- The modified JWT claims set.
-
toString
-
parseConfirmationJSONObject
protected static net.minidev.json.JSONObject parseConfirmationJSONObject(com.nimbusds.jwt.JWTClaimsSet jwtClaimsSet) Parses a confirmation JSON object from the specified JWT claims set.- Parameters:
jwtClaimsSet
- The JWT claims set.- Returns:
- The confirmation JSON object,
null
if none.
-