Class OAuth2ClientConfiguration
- java.lang.Object
-
- org.forgerock.oauth.OAuthClientConfiguration
-
- org.forgerock.oauth.clients.oauth2.OAuth2ClientConfiguration
-
- Direct Known Subclasses:
FacebookClientConfiguration
,LinkedInClientConfiguration
,OpenIDConnectClientConfiguration
public class OAuth2ClientConfiguration extends OAuthClientConfiguration
Configuration used for OAuth2 Client Implementations.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
OAuth2ClientConfiguration.Builder<T extends OAuth2ClientConfiguration.Builder<T,C>,C extends OAuth2ClientConfiguration>
Builder class for creating the OAuth2ClientConfiguration.
-
Field Summary
-
Fields inherited from class org.forgerock.oauth.OAuthClientConfiguration
PROVIDER
-
-
Constructor Summary
Constructors Constructor Description OAuth2ClientConfiguration(OAuth2ClientConfiguration.Builder<?,?> builder)
Creates an OAuth2ClientConfiguration instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Filter
getAuthenticationFilter()
Gets the filter that will update the request with authentication information on the request sent to the OAuth provider.URI
getAuthorizationEndpoint()
Gets endpoint for authentication and authorization of a user.Class<?>
getClientClass()
Gets the class name of the client implementation consuming theOAuth2ClientConfiguration
.String
getClientId()
Gets OAuth 2.0 client identifier.String
getClientSecret()
Deprecated.UsegetClientSecretReference()
instead.SecretReference<GenericSecret>
getClientSecretReference()
Returns a reference to the client secret.URI
getIntrospectEndpoint()
Gets endpoint for OAuth2 token validation.PkceMethod
getPkceMethod()
Gets the PKCE transformation method to us when making requests to the authorization endpoint.URI
getRedirectUri()
Gets redirect uri.ResponseMode
getResponseMode()
Retrieves the non-null response mode.List<String>
getScope()
Gets OAuth scopes being requested.String
getScopeDelimiter()
Gets the delimiter used by an auth server to separate scopes.URI
getTokenEndpoint()
Gets endpoint for requesting access tokens.URI
getUserInfoEndpoint()
Gets endpoint for requesting user information.static OAuth2ClientConfiguration.Builder<? extends OAuth2ClientConfiguration.Builder,OAuth2ClientConfiguration>
oauth2ClientConfiguration()
Creates a new builder for OAuth2ClientConfiguration.-
Methods inherited from class org.forgerock.oauth.OAuthClientConfiguration
getAuthenticationIdKey, getProvider
-
-
-
-
Constructor Detail
-
OAuth2ClientConfiguration
public OAuth2ClientConfiguration(OAuth2ClientConfiguration.Builder<?,?> builder)
Creates an OAuth2ClientConfiguration instance.- Parameters:
builder
- OAuth2ClientConfiguration instance builder.
-
-
Method Detail
-
oauth2ClientConfiguration
public static OAuth2ClientConfiguration.Builder<? extends OAuth2ClientConfiguration.Builder,OAuth2ClientConfiguration> oauth2ClientConfiguration()
Creates a new builder for OAuth2ClientConfiguration.- Returns:
- new OAuth2ClientConfiguration builder instance.
-
getClientClass
public Class<?> getClientClass()
Gets the class name of the client implementation consuming theOAuth2ClientConfiguration
.- Specified by:
getClientClass
in classOAuthClientConfiguration
- Returns:
- the client implementation class name.
-
getClientId
public String getClientId()
Gets OAuth 2.0 client identifier.- Returns:
- OAuth 2.0 client identifier.
-
getClientSecret
@Deprecated public String getClientSecret()
Deprecated.UsegetClientSecretReference()
instead.Gets OAuth 2.0 client secret.- Returns:
- OAuth 2.0 client secret.
-
getClientSecretReference
public SecretReference<GenericSecret> getClientSecretReference()
Returns a reference to the client secret.- Returns:
- a reference to the current client secret.
-
getAuthorizationEndpoint
public URI getAuthorizationEndpoint()
Gets endpoint for authentication and authorization of a user.- Returns:
- Endpoint for authentication and authorization of a user.
-
getTokenEndpoint
public URI getTokenEndpoint()
Gets endpoint for requesting access tokens.- Returns:
- Endpoint for requesting access tokens.
-
getUserInfoEndpoint
public URI getUserInfoEndpoint()
Gets endpoint for requesting user information.- Returns:
- Endpoint for requesting user information.
-
getIntrospectEndpoint
public URI getIntrospectEndpoint()
Gets endpoint for OAuth2 token validation.- Returns:
- Endpoint for OAuth2 token validation.
-
getRedirectUri
public URI getRedirectUri()
Gets redirect uri.- Returns:
- redirect uri.
-
getScopeDelimiter
public String getScopeDelimiter()
Gets the delimiter used by an auth server to separate scopes.- Returns:
- delimiter used to separate scope params.
-
getScope
public List<String> getScope()
Gets OAuth scopes being requested.- Returns:
- OAuth scopes being requested.
-
getAuthenticationFilter
public Filter getAuthenticationFilter()
Gets the filter that will update the request with authentication information on the request sent to the OAuth provider.- Returns:
- The filter.
-
getPkceMethod
public PkceMethod getPkceMethod()
Gets the PKCE transformation method to us when making requests to the authorization endpoint.- Returns:
- the PKCE transformation method.
-
getResponseMode
public ResponseMode getResponseMode()
Retrieves the non-null response mode.- Returns:
- the response mode
-
-