Class ClientCredentialsGrantTypeHandler

java.lang.Object
org.forgerock.secrets.oauth2.GrantTypeHandler
org.forgerock.secrets.oauth2.ClientCredentialsGrantTypeHandler

public class ClientCredentialsGrantTypeHandler extends GrantTypeHandler
A grant type handler that can retrieve an access token using the client_credentials grant type. Note that it is assumed that the client credentials are already attached to the request, via a filter for instance.
  • Constructor Details

    • ClientCredentialsGrantTypeHandler

      public ClientCredentialsGrantTypeHandler(String clientId, Collection<String> scope)
      Initialises the grant type handler with the given client id and scope.
      Parameters:
      clientId - the client id.
      scope - the scope of the request. May not be null.
    • ClientCredentialsGrantTypeHandler

      public ClientCredentialsGrantTypeHandler(String clientId)
      Initialises the grant type handler with the given client id and default scope.
      Parameters:
      clientId - the client id.
    • ClientCredentialsGrantTypeHandler

      public ClientCredentialsGrantTypeHandler(Collection<String> scope)
      Initialises the grant type handler with only the scope. Client ID is expected to already be attached to the request and is not required.
      Parameters:
      scope - the scope of the request. May not be null.
    • ClientCredentialsGrantTypeHandler

      public ClientCredentialsGrantTypeHandler()
      Initialises the grant type handler with only the default scope. Client ID is expected to already be attached to the request and is not required.