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.
  • Constructor Details

    • OAuth2ClientConfiguration

      public OAuth2ClientConfiguration(OAuth2ClientConfiguration.Builder<?,?> builder)
      Creates an OAuth2ClientConfiguration instance.
      Parameters:
      builder - OAuth2ClientConfiguration instance builder.
  • Method Details

    • 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 the OAuth2ClientConfiguration.
      Specified by:
      getClientClass in class OAuthClientConfiguration
      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.
      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