Class OAuth2PasswordGrantRequest

java.lang.Object
org.springframework.security.oauth2.client.endpoint.AbstractOAuth2AuthorizationGrantRequest
org.springframework.security.oauth2.client.endpoint.OAuth2PasswordGrantRequest

public class OAuth2PasswordGrantRequest extends AbstractOAuth2AuthorizationGrantRequest
An OAuth 2.0 Resource Owner Password Credentials Grant request that holds the resource owner's credentials.
Since:
5.2
See Also:
  • Constructor Details

    • OAuth2PasswordGrantRequest

      public OAuth2PasswordGrantRequest(ClientRegistration clientRegistration, String username, String password)
      Constructs an OAuth2PasswordGrantRequest using the provided parameters.
      Parameters:
      clientRegistration - the client registration
      username - the resource owner's username
      password - the resource owner's password
  • Method Details

    • getUsername

      public String getUsername()
      Returns the resource owner's username.
      Returns:
      the resource owner's username
    • getPassword

      public String getPassword()
      Returns the resource owner's password.
      Returns:
      the resource owner's password