Package com.nimbusds.oauth2.sdk.auth
Class X509CertificateConfirmation
java.lang.Object
com.nimbusds.oauth2.sdk.auth.X509CertificateConfirmation
X.509 certificate SHA-256 confirmation.
-
Constructor Summary
ConstructorsConstructorDescriptionX509CertificateConfirmation
(com.nimbusds.jose.util.Base64URL x5tS256) Creates a new X.509 certificate SHA-256 confirmation. -
Method Summary
Modifier and TypeMethodDescriptioncom.nimbusds.jwt.JWTClaimsSet
applyTo
(com.nimbusds.jwt.JWTClaimsSet jwtClaimsSet) Applies this X.509 certificate SHA-256 confirmation to the specified JWT claims set.boolean
com.nimbusds.jose.util.Base64URL
getValue()
Returns the X.509 certificate SHA-256 thumbprint.int
hashCode()
static X509CertificateConfirmation
of
(X509Certificate x509Cert) Creates a confirmation of the specified X.509 certificate.static X509CertificateConfirmation
parse
(com.nimbusds.jwt.JWTClaimsSet jwtClaimsSet) Parses a X.509 certificate confirmation from the specified JWT claims set.static X509CertificateConfirmation
parse
(net.minidev.json.JSONObject jsonObject) Parses a X.509 certificate confirmation from the specified JSON object representation of a JWT claims set.static X509CertificateConfirmation
parseFromConfirmationJSONObject
(net.minidev.json.JSONObject cnf) Parses a X.509 certificate confirmation from the specified confirmation ("cnf") JSON object.net.minidev.json.JSONObject
Returns this X.509 certificate SHA-256 confirmation as a JSON object.Returns this X.509 certificate SHA-256 confirmation as a JWT claim.toString()
-
Constructor Details
-
X509CertificateConfirmation
Creates a new X.509 certificate SHA-256 confirmation.- Parameters:
x5tS256
- The X.509 certificate SHA-256 thumbprint. Must not benull
.
-
-
Method Details
-
getValue
Returns the X.509 certificate SHA-256 thumbprint.- Returns:
- The X.509 certificate SHA-256 thumbprint.
-
toJSONObject
Returns this X.509 certificate SHA-256 confirmation as a JSON object.Example:
{ "cnf" : { "x5t#S256" : "bwcK0esc3ACC3DB2Y5_lESsXE8o9ltc05O89jdN-dg2" } }
- Returns:
- The JSON object.
-
toJWTClaim
Returns this X.509 certificate SHA-256 confirmation as a JWT claim.Example:
"cnf" : { "x5t#S256" : "bwcK0esc3ACC3DB2Y5_lESsXE8o9ltc05O89jdN-dg2" }
- Returns:
- The JWT claim name / value.
-
applyTo
Applies this X.509 certificate SHA-256 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 X.509 certificate confirmation from the specified JWT claims set.- Parameters:
jwtClaimsSet
- The JWT claims set.- Returns:
- The X.509 certificate confirmation,
null
if not found.
-
parse
Parses a X.509 certificate confirmation from the specified JSON object representation of a JWT claims set.- Parameters:
jsonObject
- The JSON object.- Returns:
- The X.509 certificate confirmation,
null
if not found.
-
parseFromConfirmationJSONObject
public static X509CertificateConfirmation parseFromConfirmationJSONObject(net.minidev.json.JSONObject cnf) Parses a X.509 certificate confirmation from the specified confirmation ("cnf") JSON object.- Parameters:
cnf
- The confirmation JSON object,null
if none.- Returns:
- The X.509 certificate confirmation,
null
if not found.
-
of
Creates a confirmation of the specified X.509 certificate.- Parameters:
x509Cert
- The X.509 certificate.- Returns:
- The X.509 certificate confirmation.
-