Class X509CertificateConfirmation

    • Constructor Detail

      • X509CertificateConfirmation

        public X509CertificateConfirmation​(com.nimbusds.jose.util.Base64URL x5tS256)
        Creates a new X.509 certificate SHA-256 confirmation.
        Parameters:
        x5tS256 - The X.509 certificate SHA-256 thumbprint. Must not be null.
    • Method Detail

      • getValue

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

        public net.minidev.json.JSONObject toJSONObject()
        Returns this X.509 certificate SHA-256 confirmation as a JSON object.

        Example:

         {
           "cnf" : { "x5t#S256" : "bwcK0esc3ACC3DB2Y5_lESsXE8o9ltc05O89jdN-dg2" }
         }
         
        Returns:
        The JSON object.
      • toJWTClaim

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

        Example:

         "cnf" : { "x5t#S256" : "bwcK0esc3ACC3DB2Y5_lESsXE8o9ltc05O89jdN-dg2" }
         
        Returns:
        The JWT claim name / value.
      • applyTo

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

        public static X509CertificateConfirmation parse​(com.nimbusds.jwt.JWTClaimsSet jwtClaimsSet)
        Parses a X.509 certificate confirmation from the specified JWT claims set.
        Parameters:
        jwtClaimsSet - The JWT claims set.
        Returns:
        The X.509 certificate confirmation, null if not found.
      • parse

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

        public static X509CertificateConfirmation parseFromConfirmationJSONObject​(net.minidev.json.JSONObject cnf)
        Parses a X.509 certificate confirmation from the specified confirmation ("cnf") JSON object.
        Parameters:
        cnf - The confirmation JSON object, null if none.
        Returns:
        The X.509 certificate confirmation, null if not found.
      • of

        public static X509CertificateConfirmation of​(X509Certificate x509Cert)
        Creates a confirmation of the specified X.509 certificate.
        Parameters:
        x509Cert - The X.509 certificate.
        Returns:
        The X.509 certificate confirmation.