Class JWKThumbprintConfirmation

    • Constructor Detail

      • JWKThumbprintConfirmation

        public JWKThumbprintConfirmation​(com.nimbusds.jose.util.Base64URL jkt)
        Creates a new JWK SHA-256 thumbprint.
        Parameters:
        jkt - The JWK SHA-256 thumbprint. Must not be null.
    • Method Detail

      • getValue

        public com.nimbusds.jose.util.Base64URL getValue()
        Returns the JWK SHA-256 thumbprint.
        Returns:
        The JWK SHA-256 thumbprint.
      • toJSONObject

        public net.minidev.json.JSONObject toJSONObject()
        Returns this JWK SHA-256 thumbprint confirmation as a JSON object.

        Example:

         {
           "cnf" : { "jkt" : "0ZcOCORZNYy-DWpqq30jZyJGHTN0d2HglBV3uiguA4I" }
         }
         
        Returns:
        The JSON object.
      • toJWTClaim

        public Map.Entry<String,​net.minidev.json.JSONObject> toJWTClaim()
        Returns this JWK SHA-256 thumbprint confirmation as a JWT claim.

        Example:

         "cnf" : { "jkt" : "0ZcOCORZNYy-DWpqq30jZyJGHTN0d2HglBV3uiguA4I" }
         
        Returns:
        The JWT claim name / value.
      • applyTo

        public com.nimbusds.jwt.JWTClaimsSet applyTo​(com.nimbusds.jwt.JWTClaimsSet jwtClaimsSet)
        Applies this JWK SHA-256 thumbprint confirmation to the specified JWT claims set.
        Parameters:
        jwtClaimsSet - The JWT claims set.
        Returns:
        The modified JWT claims set.
      • parse

        public static JWKThumbprintConfirmation parse​(com.nimbusds.jwt.JWTClaimsSet jwtClaimsSet)
        Parses a JWK SHA-256 thumbprint confirmation from the specified JWT claims set.
        Parameters:
        jwtClaimsSet - The JWT claims set.
        Returns:
        The JWK SHA-256 thumbprint confirmation, null if not found.
      • parse

        public static JWKThumbprintConfirmation parse​(net.minidev.json.JSONObject jsonObject)
        Parses a JWK SHA-256 thumbprint confirmation from the specified JSON object representation of a JWT claims set.
        Parameters:
        jsonObject - The JSON object.
        Returns:
        The JWK SHA-256 thumbprint confirmation, null if not found.
      • parseFromConfirmationJSONObject

        public static JWKThumbprintConfirmation parseFromConfirmationJSONObject​(net.minidev.json.JSONObject cnf)
        Parses a JWK SHA-256 thumbprint confirmation from the specified confirmation ("cnf") JSON object.
        Parameters:
        cnf - The confirmation JSON object, null if none.
        Returns:
        The JWK SHA-256 thumbprint confirmation, null if not found.
      • of

        public static JWKThumbprintConfirmation of​(com.nimbusds.jose.jwk.JWK jwk)
                                            throws com.nimbusds.jose.JOSEException
        Creates a confirmation of the specified JWK.
        Parameters:
        jwk - The JWK.
        Returns:
        The JWK SHA-256 thumbprint confirmation.
        Throws:
        com.nimbusds.jose.JOSEException - If the thumbprint computation failed.