Class DPoP

  • All Implemented Interfaces:
    java.io.Serializable

    public class DPoP
    extends Jwt
    Version:
    September 30, 2021
    Author:
    Javier Rojas Blum
    See Also:
    Serialized Form
    • Method Detail

      • generateJti

        public static java.lang.String generateJti()
      • generateAccessTokenHash

        public static java.lang.String generateAccessTokenHash​(java.lang.String accessToken)
      • getType

        public JwtType getType()
        Returns the type header (typ) dpop+jwt
        Returns:
        The type header (typ) dpop+jwt
      • getSignatureAlgorithm

        public AsymmetricSignatureAlgorithm getSignatureAlgorithm()
        Returns the digital signature algorithm identifier (Asymmetric Algorithm, must not be none).
        Returns:
        The digital signature algorithm identifier.
      • setSignatureAlgorithm

        public void setSignatureAlgorithm​(AsymmetricSignatureAlgorithm asymmetricSignatureAlgorithm)
        Sets the digital signature algorithm identifier (Asymmetric Algorithm, must not be none).
        Parameters:
        asymmetricSignatureAlgorithm - The digital signature algorithm identifier.
      • getJwk

        public JSONWebKey getJwk()
        Returns the public key chosen by the client, in JWK format.
        Returns:
        The public key.
      • setJwk

        public void setJwk​(JSONWebKey jwk)
        Sets the public key chosen by the client, in JWK format. Must not contain the private key.
        Parameters:
        jwk - The public key.
      • getJti

        public java.lang.String getJti()
        Returns the unique identifier for the DPoP proof JWT.
        Returns:
        The unique identifier for the DPoP proof JWT.
      • setJti

        public void setJti​(java.lang.String jti)
        Sets the unique identifier for the DPoP proof JWT. The value must be assigned such that there is a negligible probability that the same value will be assigned to any other DPoP proof used in the same context during the time window of validity.
        Parameters:
        jti - The unique identifier for the DPoP JWT.
      • getHtm

        public java.lang.String getHtm()
        Returns the HTTP method for the request to which the JWT is attached.
        Returns:
        The HTTP method.
      • setHtm

        public void setHtm​(java.lang.String htm)
        Sets the HTTP method for the request to which the JWT is attached.
        Parameters:
        htm - The HTTP method.
      • getHtu

        public java.lang.String getHtu()
        Returns the HTTP URI used for the request, without query and fragment parts.
        Returns:
        The HTTP URI used for the request.
      • setHtu

        public void setHtu​(java.lang.String htu)
        Sets the HTTP URI used for the request, without query and fragment parts.
        Parameters:
        htu - The HTTP URI used for the request.
      • getIat

        public java.lang.Long getIat()
        Returns the time at which the JWT was created.
        Returns:
        The time at which the JWT was created.
      • setIat

        public void setIat​(java.lang.Long iat)
        Sets the time at which the JWT was created.
        Parameters:
        iat - The time at which the JWT was created.
      • getAth

        public java.lang.String getAth()
        Returns the Hash of the access token. Required when the DPoP proof is used in conjunction with the presentation of an access token.
        Returns:
        The Hash of the access token.
      • setAth

        public void setAth​(java.lang.String ath)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class Jwt