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.

See Access Token Request

Author:
Marcus Portmann
  • Field Details

    • GRANT_TYPE

      public static final String GRANT_TYPE
      The grant type for the Resource Owner Password Credentials Grant.
      See Also:
    • PASSWORD_PARAMETER

      public static final String PASSWORD_PARAMETER
      The name of the resource owner password parameter.

      This parameter is REQUIRED.

      See Also:
    • USERNAME_PARAMETER

      public static final String USERNAME_PARAMETER
      The name of the resource owner username parameter.

      This parameter is REQUIRED.

      See Also:
  • Constructor Details

    • ResourceOwnerPasswordCredentialsGrantRequest

      public ResourceOwnerPasswordCredentialsGrantRequest(Map<String,String> parameters)
      Constructs a new ResourceOwnerPasswordCredentialsGrantRequest.
      Parameters:
      parameters - the request parameters
  • Method Details

    • 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