Package com.nimbusds.oauth2.sdk.dpop
Class DPoPUtils
- java.lang.Object
-
- com.nimbusds.oauth2.sdk.dpop.DPoPUtils
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com.nimbusds.jose.util.Base64URL
computeSHA256(AccessToken accessToken)
Computes a SHA-256 hash for the specified access token.static com.nimbusds.jwt.JWTClaimsSet
createJWTClaimsSet(JWTID jti, String htm, URI htu, Date iat, AccessToken accessToken)
Creates a new DPoP JWT claims set.
-
-
-
Method Detail
-
createJWTClaimsSet
public static com.nimbusds.jwt.JWTClaimsSet createJWTClaimsSet(JWTID jti, String htm, URI htu, Date iat, AccessToken accessToken) 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,null
if 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.
-
-