Class 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 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
    • Constructor Detail

      • ResourceOwnerPasswordCredentialsGrantRequest

        public ResourceOwnerPasswordCredentialsGrantRequest​(Map<String,​String> parameters)
        Constructs a new ResourceOwnerPasswordCredentialsGrantRequest.
        Parameters:
        parameters - the request parameters
    • 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