Class GrantRequest
- java.lang.Object
-
- africa.absa.inception.oauth2.server.authorization.controller.GrantRequest
-
- Direct Known Subclasses:
RefreshAccessTokenGrantRequest,ResourceOwnerPasswordCredentialsGrantRequest
public abstract class GrantRequest extends Object
The GrantRequest class provides the base class that all OAuth2 grant request classes should be derived from.- Author:
- Marcus Portmann
-
-
Field Summary
Fields Modifier and Type Field Description static StringCLIENT_ID_PARAMETERThe name of the client ID parameter.static StringCLIENT_SECRET_PARAMETERThe name of the client secret parameter.static StringGRANT_TYPE_PARAMETERThe name of the grant type parameter.static StringSCOPE_PARAMETERThe name of the parameter providing the requested access token scope.static StringSTATE_PARAMETERThe name of the state parameter.
-
Constructor Summary
Constructors Constructor Description GrantRequest(Map<String,String> parameters)Constructs a new GrantRequest.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetClientId()Returns the client identifier issued to the client.StringgetClientSecret()Returns the client secret.StringgetGrantType()Returns the grant type.StringgetScope()Returns the requested scope(s) for the access request.StringgetState()Returns the state received from the client.
-
-
-
Field Detail
-
CLIENT_ID_PARAMETER
public static final String CLIENT_ID_PARAMETER
The name of the client ID parameter.This parameter is REQUIRED if client authentication is enabled.
- See Also:
- Constant Field Values
-
CLIENT_SECRET_PARAMETER
public static final String CLIENT_SECRET_PARAMETER
The name of the client secret parameter.This parameter is REQUIRED if client authentication is enabled.
- See Also:
- Constant Field Values
-
GRANT_TYPE_PARAMETER
public static final String GRANT_TYPE_PARAMETER
The name of the grant type parameter.This parameter is REQUIRED.
- See Also:
- Constant Field Values
-
SCOPE_PARAMETER
public static final String SCOPE_PARAMETER
The name of the parameter providing the requested access token scope.This parameter is OPTIONAL.
- See Also:
- Constant Field Values
-
STATE_PARAMETER
public static final String STATE_PARAMETER
The name of the state parameter.This parameter is OPTIONAL.
- See Also:
- Constant Field Values
-
-
Method Detail
-
getClientId
public String getClientId()
Returns the client identifier issued to the client.- Returns:
- the client identifier issued to the client
-
getClientSecret
public String getClientSecret()
Returns the client secret.- Returns:
- the client secret
-
getGrantType
public String getGrantType()
Returns the grant type.- Returns:
- the grant type
-
getScope
public String getScope()
Returns the requested scope(s) for the access request.- Returns:
- the requested scope(s) for the access request
-
getState
public String getState()
Returns the state received from the client.- Returns:
- the state received from the client
-
-