Class ResourceOwnerPasswordCredentialsGrantRequest
- java.lang.Object
-
- africa.absa.inception.oauth2.server.authorization.controller.GrantRequest
-
- africa.absa.inception.oauth2.server.authorization.controller.ResourceOwnerPasswordCredentialsGrantRequest
-
public class ResourceOwnerPasswordCredentialsGrantRequest extends GrantRequest
The ResourceOwnerPasswordCredentialsGrantRequest class holds the information for a Resource Owner Password Credentials Grant request.- Author:
- Marcus Portmann
-
-
Field Summary
Fields Modifier and Type Field Description static StringGRANT_TYPEThe grant type for the Resource Owner Password Credentials Grant.static StringPASSWORD_PARAMETERThe name of the resource owner password parameter.static StringUSERNAME_PARAMETERThe 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
Constructors Constructor Description ResourceOwnerPasswordCredentialsGrantRequest(Map<String,String> parameters)Constructs a new ResourceOwnerPasswordCredentialsGrantRequest.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetPassword()Returns the resource owner password.StringgetUsername()Returns the resource owner username.static booleanisValid(Map<String,String> parameters)Check 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 Detail
-
GRANT_TYPE
public static final String GRANT_TYPE
The grant type for the Resource Owner Password Credentials Grant.- See Also:
- Constant Field Values
-
PASSWORD_PARAMETER
public static final String PASSWORD_PARAMETER
The name of the resource owner password parameter.This parameter is REQUIRED.
- See Also:
- Constant Field Values
-
USERNAME_PARAMETER
public static final String USERNAME_PARAMETER
The name of the resource owner username parameter.This parameter is REQUIRED.
- See Also:
- Constant Field Values
-
-
Method Detail
-
isValid
public static boolean isValid(Map<String,String> parameters)
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
public String getPassword()
Returns the resource owner password.- Returns:
- the resource owner password
-
getUsername
public String getUsername()
Returns the resource owner username.- Returns:
- the resource owner username
-
-