@Introspected public class PasswordGrant extends java.lang.Object implements SecureGrant, AsMap
KEY_CLIENT_ID, KEY_CLIENT_SECRET
Constructor and Description |
---|
PasswordGrant()
Default constructor.
|
PasswordGrant(AuthenticationRequest authenticationRequest,
OauthClientConfiguration clientConfiguration) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getClientId() |
java.lang.String |
getClientSecret() |
java.lang.String |
getGrantType() |
java.lang.String |
getPassword() |
java.lang.String |
getScope() |
java.lang.String |
getUsername() |
void |
setClientId(java.lang.String clientId)
Sets the client id in the grant.
|
void |
setClientSecret(java.lang.String clientSecret)
Sets the client secret in the grant.
|
void |
setGrantType(java.lang.String grantType) |
void |
setPassword(java.lang.String password) |
void |
setScope(java.lang.String scope) |
void |
setUsername(java.lang.String username) |
java.util.Map<java.lang.String,java.lang.String> |
toMap() |
public PasswordGrant()
public PasswordGrant(AuthenticationRequest authenticationRequest, OauthClientConfiguration clientConfiguration)
authenticationRequest
- The authentication requestclientConfiguration
- The client configuration@NonNull public java.lang.String getGrantType()
public void setGrantType(@NonNull java.lang.String grantType)
grantType
- OAuth 2.0 Grant Type.@NonNull public java.lang.String getClientId()
public void setClientId(@NonNull java.lang.String clientId)
SecureGrant
setClientId
in interface SecureGrant
clientId
- Application's Client identifier.public void setClientSecret(java.lang.String clientSecret)
SecureGrant
setClientSecret
in interface SecureGrant
clientSecret
- Application's Client clientSecret.public java.lang.String getClientSecret()
@NonNull public java.lang.String getUsername()
public void setUsername(@NonNull java.lang.String username)
username
- An username@NonNull public java.lang.String getPassword()
public void setPassword(@NonNull java.lang.String password)
password
- An password@Nullable public java.lang.String getScope()
public void setScope(@NonNull java.lang.String scope)
scope
- Requested scopes separed by spaces