Class DPoPUtils

    • 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.
        jti - The JWT ID. Must not be null.
        htm - The HTTP request method. Must not be null.
        htu - The HTTP URI, without a query or fragment. Must not be null.
        iat - The issue time. Must not be null.
        accessToken - The access token for the access token hash ("ath") claim computation, null if not specified.
        The JWT claims set.
        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.
        accessToken - The access token. Must not be null.
        The hash, BASE64 URL encoded.
        com.nimbusds.jose.JOSEException - If hashing failed.