Package org.forgerock.secrets.oauth2
Class GrantTypeHandler
- java.lang.Object
-
- org.forgerock.secrets.oauth2.GrantTypeHandler
-
- Direct Known Subclasses:
AuthorizationCodeGrantTypeHandler
,ClientCredentialsGrantTypeHandler
,JwtBearerGrantTypeHandler
,RefreshTokenGrantTypeHandler
,ResourceOwnerPasswordGrantTypeHandler
public abstract class GrantTypeHandler extends Object
Abstract base class for OAuth 2 grant type handlers for calling the token endpoint. Each handler can add additional parameters to the token request.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
GrantTypeHandler(String grantType, String clientId)
Initialises the grant type handler with the given grant type name and client id.protected
GrantTypeHandler(String grantType, String clientId, Collection<String> scope)
Initialises the grant type handler with the given grant type name and client id.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getClientId()
The client id of the client using this grant type.String
getGrantType()
The name of the grant type implemented by this handler.String
toString()
-
-
-
Constructor Detail
-
GrantTypeHandler
protected GrantTypeHandler(String grantType, String clientId, Collection<String> scope)
Initialises the grant type handler with the given grant type name and client id.- Parameters:
grantType
- the grant type name such as "client_credentials".clientId
- the client id. May be null.scope
- the scope to add to the request. May not be null. Represents the scope of the authorization grant being requested, as per RFC 6749.
-
-