Class OAuth2ClientConfiguration.Builder<T extends OAuth2ClientConfiguration.Builder<T,​C>,​C extends OAuth2ClientConfiguration>

    • Constructor Detail

      • Builder

        protected Builder​(Function<T,​C> builder)
        Limit constructor visibility.
        Parameters:
        builder - OAuth2ClientConfiguration builder
    • Method Detail

      • withClientId

        public T withClientId​(String clientId)
        Set the clientId.
        Parameters:
        clientId - identifier of client.
        Returns:
        Builder
      • withClientSecret

        public T withClientSecret​(SecretReference<GenericSecret> clientSecret)
        Set the clientSecret.
        Parameters:
        clientSecret - client password.
        Returns:
        Builder
      • withAuthorizationEndpoint

        public T withAuthorizationEndpoint​(String authorizationEndpoint)
        Set the authorizationEndpoint.
        Parameters:
        authorizationEndpoint - endpoint to perform authentication and authorization.
        Returns:
        Builder
      • withTokenEndpoint

        public T withTokenEndpoint​(String tokenEndpoint)
        Set the tokenEndpoint.
        Parameters:
        tokenEndpoint - endpoint used to retrieve access, id, and refresh tokens.
        Returns:
        Builder
      • withUserInfoEndpoint

        public T withUserInfoEndpoint​(String userInfoEndpoint)
        Set the userInfoEndpoint.
        Parameters:
        userInfoEndpoint - endpoint used to retrieve information about a particular identity.
        Returns:
        Builder
      • withIntrospectEndpoint

        public T withIntrospectEndpoint​(String introspectEndpoint)
        Set the introspectEndpoint.
        Parameters:
        introspectEndpoint - endpoint used for OAuth2 token validation.
        Returns:
        Builder
      • withRedirectUri

        public T withRedirectUri​(URI redirectUri)
        Set the redirectUri.
        Parameters:
        redirectUri - uri to redirect the user agent back to from the authorization server.
        Returns:
        Builder
      • withScopeDelimiter

        public T withScopeDelimiter​(String scopeDelimiter)
        Set the scopeDelimiter.
        Parameters:
        scopeDelimiter - delimiter used to separate scope values in a request.
        Returns:
        Builder
      • withScope

        public T withScope​(List<String> scope)
        Set the scope.
        Parameters:
        scope - scope Strings in a list.
        Returns:
        Builder
      • withBasicAuth

        public T withBasicAuth​(boolean basicAuth)
        Set the basicAuth flag.
        Parameters:
        basicAuth - boolean that holds whether the client should use basic auth for authenticating with an authorization or resource server.
        Returns:
        Builder
      • withClientAuthenticationFilter

        public T withClientAuthenticationFilter​(Filter filter)
        Sets the client authentication filter capable of sending authentication information to the OAuth provider.
        Parameters:
        filter - the client authentication filter capable of sending authentication information to the OAuth provider.
        Returns:
        Builder
      • withPkceMethod

        public T withPkceMethod​(PkceMethod pkceMethod)
        Sets the PKCE transformation method to use.
        Parameters:
        pkceMethod - the PKCE transformation method.
        Returns:
        Builder.
      • withResponseMode

        public T withResponseMode​(ResponseMode responseMode)
        Sets the response mode.
        Parameters:
        responseMode - the non-null response mode
        Returns:
        this builder