Package com.nimbusds.oauth2.sdk.dpop
Class DPoPUtils
java.lang.Object
com.nimbusds.oauth2.sdk.dpop.DPoPUtils
DPoP utilities.
-
Method Summary
Modifier and TypeMethodDescriptionstatic com.nimbusds.jose.util.Base64URLcomputeSHA256(AccessToken accessToken) Computes a SHA-256 hash for the specified access token.static com.nimbusds.jwt.JWTClaimsSetcreateJWTClaimsSet(JWTID jti, String htm, URI htu, Date iat, AccessToken accessToken) Deprecated.static com.nimbusds.jwt.JWTClaimsSetcreateJWTClaimsSet(JWTID jti, String htm, URI htu, Date iat, AccessToken accessToken, Nonce nonce) Creates a new DPoP JWT claims set.
-
Method Details
-
createJWTClaimsSet
@Deprecated public static com.nimbusds.jwt.JWTClaimsSet createJWTClaimsSet(JWTID jti, String htm, URI htu, Date iat, AccessToken accessToken) throws com.nimbusds.jose.JOSEException Deprecated.Creates a new DPoP JWT claims set.- Parameters:
jti- The JWT ID. Must not benull.htm- The HTTP request method. Must not benull.htu- The HTTP URI, without a query or fragment. Must not benull.iat- The issue time. Must not benull.accessToken- The access token for the access token hash ("ath") claim computation,nullif not specified.- Returns:
- The JWT claims set.
- Throws:
com.nimbusds.jose.JOSEException- If a cryptographic exception was encountered.
-
createJWTClaimsSet
public static com.nimbusds.jwt.JWTClaimsSet createJWTClaimsSet(JWTID jti, String htm, URI htu, Date iat, AccessToken accessToken, Nonce nonce) throws com.nimbusds.jose.JOSEException Creates a new DPoP JWT claims set.- Parameters:
jti- The JWT ID. Must not benull.htm- The HTTP request method. Must not benull.htu- The HTTP URI, without a query or fragment. Must not benull.iat- The issue time. Must not benull.accessToken- The access token for the access token hash ("ath") claim computation,nullif not specified.nonce- The nonce,nullif not specified.- Returns:
- The JWT claims set.
- Throws:
com.nimbusds.jose.JOSEException- If a cryptographic exception was encountered.
-
computeSHA256
public static com.nimbusds.jose.util.Base64URL computeSHA256(AccessToken accessToken) throws com.nimbusds.jose.JOSEException Computes a SHA-256 hash for the specified access token.- Parameters:
accessToken- The access token. Must not benull.- Returns:
- The hash, BASE64 URL encoded.
- Throws:
com.nimbusds.jose.JOSEException- If hashing failed.
-