Class OAuth2IntrospectValidator.Builder

    • Field Detail

      • clientId

        private String clientId
      • clientSecret

        private String clientSecret
      • tokenIntrospectionUrl

        private URL tokenIntrospectionUrl
    • Constructor Detail

      • Builder

        private Builder()
    • Method Detail

      • tokenIntrospectionUrl

        public OAuth2IntrospectValidator.Builder tokenIntrospectionUrl​(URL url)
        An URL pointing to a RFC-7662 OAuth2 Token Introspection compatible endpoint.
        Parameters:
        url - the token introspection endpoint
        Returns:
        this instance
      • clientId

        public OAuth2IntrospectValidator.Builder clientId​(String clientId)

        The identifier of a client registered within the OAuth2 Authorization Server that will be used to authenticate this server in order to validate bearer tokens arriving to this server.

        Please note that the client will be usually a confidential client with both an identifier and secret configured in order to authenticate against the token introspection endpoint. In this case, the endpoint must support HTTP BASIC authentication using the client credentials (both id and secret).

        Parameters:
        clientId - the identifier of a client within the OAUth2 Authorization Server
        Returns:
        this instance
      • useSslContext

        public OAuth2IntrospectValidator.Builder useSslContext​(SSLContext sslContext)

        A predefined SSLContext that will be used to connect to the token introspection endpoint when using SSL/TLS. This configuration is mandatory if the given token introspection url is using SSL/TLS.

        Parameters:
        sslContext - the SSL context
        Returns:
        this instance
      • useSslHostnameVerifier

        public OAuth2IntrospectValidator.Builder useSslHostnameVerifier​(HostnameVerifier hostnameVerifier)
        A HostnameVerifier that will be used to validate the hostname when using SSL/TLS. This configuration is mandatory if the given token introspection url is using SSL/TLS.
        Parameters:
        hostnameVerifier - the hostname verifier
        Returns:
        this instance