Class OAuth2ClientConfiguration.Builder<T extends OAuth2ClientConfiguration.Builder<T,C>,C extends OAuth2ClientConfiguration>
java.lang.Object
org.forgerock.oauth.OAuthClientConfiguration.Builder<T,C>
org.forgerock.oauth.clients.oauth2.OAuth2ClientConfiguration.Builder<T,C>
- Type Parameters:
T
- the type of OAuthClientConfiguration builder to build.C
- the type ofOAuthClientConfiguration
to build.
- Direct Known Subclasses:
FacebookClientConfiguration.Builder
,LinkedInClientConfiguration.Builder
,OpenIDConnectClientConfiguration.Builder
- Enclosing class:
- OAuth2ClientConfiguration
public abstract static class OAuth2ClientConfiguration.Builder<T extends OAuth2ClientConfiguration.Builder<T,C>,C extends OAuth2ClientConfiguration>
extends OAuthClientConfiguration.Builder<T,C>
Builder class for creating the OAuth2ClientConfiguration.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionwithAuthorizationEndpoint
(String authorizationEndpoint) Set the authorizationEndpoint.withBasicAuth
(boolean basicAuth) Set the basicAuth flag.withClientAuthenticationFilter
(Filter filter) Sets the client authentication filter capable of sending authentication information to the OAuth provider.withClientId
(String clientId) Set the clientId.withClientSecret
(String clientSecret) Deprecated.withClientSecret
(SecretReference<GenericSecret> clientSecret) Set the clientSecret.withIntrospectEndpoint
(String introspectEndpoint) Set the introspectEndpoint.withPkceMethod
(PkceMethod pkceMethod) Sets the PKCE transformation method to use.withRedirectUri
(URI redirectUri) Set the redirectUri.withResponseMode
(ResponseMode responseMode) Sets the response mode.Set the scope.withScopeDelimiter
(String scopeDelimiter) Set the scopeDelimiter.withTokenEndpoint
(String tokenEndpoint) Set the tokenEndpoint.withUserInfoEndpoint
(String userInfoEndpoint) Set the userInfoEndpoint.Methods inherited from class org.forgerock.oauth.OAuthClientConfiguration.Builder
build, self, withAuthenticationIdKey, withProvider
-
Constructor Details
-
Builder
Limit constructor visibility.- Parameters:
builder
- OAuth2ClientConfiguration builder
-
-
Method Details
-
withClientId
Set the clientId.- Parameters:
clientId
- identifier of client.- Returns:
- Builder
-
withClientSecret
Deprecated.UsewithClientSecret(SecretReference)
instead.Set the clientSecret.- Parameters:
clientSecret
- client password.- Returns:
- Builder
-
withClientSecret
Set the clientSecret.- Parameters:
clientSecret
- client password.- Returns:
- Builder
-
withAuthorizationEndpoint
Set the authorizationEndpoint.- Parameters:
authorizationEndpoint
- endpoint to perform authentication and authorization.- Returns:
- Builder
-
withTokenEndpoint
Set the tokenEndpoint.- Parameters:
tokenEndpoint
- endpoint used to retrieve access, id, and refresh tokens.- Returns:
- Builder
-
withUserInfoEndpoint
Set the userInfoEndpoint.- Parameters:
userInfoEndpoint
- endpoint used to retrieve information about a particular identity.- Returns:
- Builder
-
withIntrospectEndpoint
Set the introspectEndpoint.- Parameters:
introspectEndpoint
- endpoint used for OAuth2 token validation.- Returns:
- Builder
-
withRedirectUri
Set the redirectUri.- Parameters:
redirectUri
- uri to redirect the user agent back to from the authorization server.- Returns:
- Builder
-
withScopeDelimiter
Set the scopeDelimiter.- Parameters:
scopeDelimiter
- delimiter used to separate scope values in a request.- Returns:
- Builder
-
withScope
Set the scope.- Parameters:
scope
- scope Strings in a list.- Returns:
- Builder
-
withBasicAuth
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
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
Sets the PKCE transformation method to use.- Parameters:
pkceMethod
- the PKCE transformation method.- Returns:
- Builder.
-
withResponseMode
Sets the response mode.- Parameters:
responseMode
- the non-null response mode- Returns:
- this builder
-
withClientSecret(SecretReference)
instead.