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:
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.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description T
withAuthorizationEndpoint(String authorizationEndpoint)
Set the authorizationEndpoint.T
withBasicAuth(boolean basicAuth)
Set the basicAuth flag.T
withClientId(String clientId)
Set the clientId.T
withClientSecret(String clientSecret)
Deprecated.UsewithClientSecret(SecretReference)
instead.T
withClientSecret(SecretReference<GenericSecret> clientSecret)
Set the clientSecret.T
withPkceMethod(PkceMethod pkceMethod)
Sets the PKCE transformation method to use.T
withRedirectUri(URI redirectUri)
Set the redirectUri.T
withScope(List<String> scope)
Set the scope.T
withScopeDelimiter(String scopeDelimiter)
Set the scopeDelimiter.T
withTokenEndpoint(String tokenEndpoint)
Set the tokenEndpoint.T
withUserInfoEndpoint(String userInfoEndpoint)
Set the userInfoEndpoint.-
Methods inherited from class org.forgerock.oauth.OAuthClientConfiguration.Builder
build, self, withAuthenticationIdKey, withProvider
-
-
-
-
Method Detail
-
withClientId
public T withClientId(String clientId)
Set the clientId.- Parameters:
clientId
- identifier of client.- Returns:
- Builder
-
withClientSecret
@Deprecated public T withClientSecret(String clientSecret)
Deprecated.UsewithClientSecret(SecretReference)
instead.Set the clientSecret.- Parameters:
clientSecret
- client password.- 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
-
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
-
withPkceMethod
public T withPkceMethod(PkceMethod pkceMethod)
Sets the PKCE transformation method to use.- Parameters:
pkceMethod
- the PKCE transformation method.- Returns:
- Builder.
-
-