Class AccessTokenValidator.Params

    • Constructor Detail

      • Params

        public Params()
    • Method Detail

      • getAccessToken

        public String getAccessToken()
        Get the access token to validate.
        Returns:
        The access token to validate.
      • setAccessToken

        public AccessTokenValidator.Params setAccessToken​(String accessToken)
        Set the access token to validate.

        If null is given, the validate method will throw a WebApplicationException.

        Parameters:
        accessToken - The access token to validate.
        Returns:
        this object.
      • getRequiredScopes

        public String[] getRequiredScopes()
        Get the scopes that must be associated with the access token.
        Returns:
        The scopes that must be associated with the access token.
      • setRequiredScopes

        public AccessTokenValidator.Params setRequiredScopes​(String[] scopes)
        Set the scopes that must be associated with the access token.

        If a non-null value is given, it will be checked whether the scopes are associated with the access token.

        Parameters:
        scopes - The scopes that must be associated with the access token.
        Returns:
        this object.
      • getRequiredSubject

        public String getRequiredSubject()
        Get the subject (= user's unique identifier) that must be associated with the access token.
        Returns:
        The subject that must be associated with the access token.
      • setRequiredSubject

        public AccessTokenValidator.Params setRequiredSubject​(String subject)
        Set the subject (= user's unique identifier) that must be associated with the access token.

        If a non-null value is given, it will be checked whether the subject is associated with the access token.

        Parameters:
        subject - The subject that must be associated with the access token.
        Returns:
        this object.
      • getDpop

        public String getDpop()
        Get the DPoP proof JWT (the value of the DPoP HTTP header).
        Returns:
        The DPoP proof JWT.
      • setDpop

        public AccessTokenValidator.Params setDpop​(String dpop)
        Set the DPoP proof JWT (the value of the DPoP HTTP header).

        If the token type of the access token is DPoP, it will be checked whether the presented DPoP proof JWT is valid for the access token. See "OAuth 2.0 Demonstration of Proof-of-Possession at the Application Layer (DPoP)" for details.

        Parameters:
        dpop - The DPoP proof JWT.
        Returns:
        this object.
      • getHtm

        public String getHtm()
        Get the HTTP method of the API call to the protected resource endpoint.
        Returns:
        The HTTP method of the API call to the protected resource endpoint. For example, "GET".
      • setHtm

        public AccessTokenValidator.Params setHtm​(String htm)
        Set the HTTP method of the API call to the protected resource endpoint.

        If the token type of the access token is DPoP, it will be checked whether the HTTP method is valid for the presented DPoP proof JWT. See "OAuth 2.0 Demonstration of Proof-of-Possession at the Application Layer (DPoP)" for details.

        Parameters:
        htm - The HTTP method of the API call to the protected resource endpoint. For example, "GET".
        Returns:
        this object.
      • getHtu

        public String getHtu()
        Get the URL of the protected resource endpoint.
        Returns:
        The URL of the protected resource endpoint.
      • setHtu

        public AccessTokenValidator.Params setHtu​(String htu)
        Set the URL of the protected resource endpoint.

        If the token type of the access token is DPoP, it will be checked whether the URL is valid for the presented DPoP proof JWT. See "OAuth 2.0 Demonstration of Proof-of-Possession at the Application Layer (DPoP)" for details.

        Parameters:
        htu - The URL of the protected resource endpoint.
        Returns:
        this object.