Class AccessTokenHash

    • Constructor Detail

      • AccessTokenHash

        public AccessTokenHash​(String value)
        Creates a new access token hash with the specified value.
        Parameters:
        value - The access token hash value. Must not be null.
    • Method Detail

      • isRequiredInIDTokenClaims

        public static boolean isRequiredInIDTokenClaims​(ResponseType responseType)
        Checks if an access token hash claim must be included in ID tokens for the specified response type.
        Parameters:
        responseType - The OpenID Connect response type. Must not be null.
        Returns:
        true if the access token hash is required, else false.
      • compute

        public static AccessTokenHash compute​(AccessToken accessToken,
                                              com.nimbusds.jose.JWSAlgorithm alg)
        Computes the hash for the specified access token and reference JSON Web Signature (JWS) algorithm.
        Parameters:
        accessToken - The access token. Must not be null.
        alg - The reference JWS algorithm. Must not be null.
        Returns:
        The access token hash, or null if the JWS algorithm is not supported.