Class ResourceOwnerPasswordCredentialsGrantRequest
java.lang.Object
africa.absa.inception.oauth2.server.authorization.controller.GrantRequest
africa.absa.inception.oauth2.server.authorization.controller.ResourceOwnerPasswordCredentialsGrantRequest
The ResourceOwnerPasswordCredentialsGrantRequest class holds the information for a
Resource Owner Password Credentials Grant request.
- Author:
- Marcus Portmann
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe grant type for the Resource Owner Password Credentials Grant.static final StringThe name of the resource owner password parameter.static final StringThe name of the resource owner username parameter.Fields inherited from class africa.absa.inception.oauth2.server.authorization.controller.GrantRequest
CLIENT_ID_PARAMETER, CLIENT_SECRET_PARAMETER, GRANT_TYPE_PARAMETER, SCOPE_PARAMETER, STATE_PARAMETER -
Constructor Summary
ConstructorsConstructorDescriptionResourceOwnerPasswordCredentialsGrantRequest(Map<String, String> parameters) Constructs a new ResourceOwnerPasswordCredentialsGrantRequest. -
Method Summary
Modifier and TypeMethodDescriptionReturns the resource owner password.Returns the resource owner username.static booleanCheck whether the required information for the Resource Owner Password Credentials Grant is provided as part of the HTTP servlet request.Methods inherited from class africa.absa.inception.oauth2.server.authorization.controller.GrantRequest
getClientId, getClientSecret, getGrantType, getScope, getState
-
Field Details
-
GRANT_TYPE
The grant type for the Resource Owner Password Credentials Grant.- See Also:
-
PASSWORD_PARAMETER
The name of the resource owner password parameter.This parameter is REQUIRED.
- See Also:
-
USERNAME_PARAMETER
The name of the resource owner username parameter.This parameter is REQUIRED.
- See Also:
-
-
Constructor Details
-
ResourceOwnerPasswordCredentialsGrantRequest
Constructs a new ResourceOwnerPasswordCredentialsGrantRequest.- Parameters:
parameters- the request parameters
-
-
Method Details
-
isValid
Check whether the required information for the Resource Owner Password Credentials Grant is provided as part of the HTTP servlet request.- Parameters:
parameters- the request parameters- Returns:
- true if the HTTP servlet request contains the required information for the Resource Owner Password Credentials Grant or false otherwise
-
getPassword
Returns the resource owner password.- Returns:
- the resource owner password
-
getUsername
Returns the resource owner username.- Returns:
- the resource owner username
-