Class OAuth2PasswordGrantRequest
java.lang.Object
org.springframework.security.oauth2.client.endpoint.AbstractOAuth2AuthorizationGrantRequest
org.springframework.security.oauth2.client.endpoint.OAuth2PasswordGrantRequest
@Deprecated(since="5.8",
forRemoval=true)
public class OAuth2PasswordGrantRequest
extends AbstractOAuth2AuthorizationGrantRequest
Deprecated, for removal: This API element is subject to removal in a future version.
The OAuth 2.0 Security Best Current Practice disallows the use of the
Resource Owner Password Credentials grant. See reference OAuth 2.0 Security Best
Current Practice.
An OAuth 2.0 Resource Owner Password Credentials Grant request that holds the resource
owner's credentials.
- Since:
- 5.2
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionOAuth2PasswordGrantRequest
(ClientRegistration clientRegistration, String username, String password) Deprecated, for removal: This API element is subject to removal in a future version.Constructs anOAuth2PasswordGrantRequest
using the provided parameters. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated, for removal: This API element is subject to removal in a future version.Returns the resource owner's password.Deprecated, for removal: This API element is subject to removal in a future version.Returns the resource owner's username.Methods inherited from class org.springframework.security.oauth2.client.endpoint.AbstractOAuth2AuthorizationGrantRequest
getClientRegistration, getGrantType
-
Constructor Details
-
OAuth2PasswordGrantRequest
public OAuth2PasswordGrantRequest(ClientRegistration clientRegistration, String username, String password) Deprecated, for removal: This API element is subject to removal in a future version.Constructs anOAuth2PasswordGrantRequest
using the provided parameters.- Parameters:
clientRegistration
- the client registrationusername
- the resource owner's usernamepassword
- the resource owner's password
-
-
Method Details
-
getUsername
Deprecated, for removal: This API element is subject to removal in a future version.Returns the resource owner's username.- Returns:
- the resource owner's username
-
getPassword
Deprecated, for removal: This API element is subject to removal in a future version.Returns the resource owner's password.- Returns:
- the resource owner's password
-