Class PasswordGrant
java.lang.Object
io.micronaut.security.oauth2.grants.AbstractClientSecureGrant
io.micronaut.security.oauth2.grants.PasswordGrant
- All Implemented Interfaces:
 AsMap,SecureGrant
@Introspected
public class PasswordGrant
extends AbstractClientSecureGrant
implements SecureGrant, AsMap
Resource Owner Password Credentials Grant.
- Since:
 - 1.2.0
 - Author:
 - Sergio del Amo
 - See Also:
 
- 
Field Summary
Fields inherited from class io.micronaut.security.oauth2.grants.AbstractClientSecureGrant
clientId, clientSecretFields inherited from interface io.micronaut.security.oauth2.grants.SecureGrant
KEY_CLIENT_ID, KEY_CLIENT_SECRET - 
Constructor Summary
ConstructorsConstructorDescriptionPasswordGrant(AuthenticationRequest authenticationRequest, OauthClientConfiguration clientConfiguration)  - 
Method Summary
Modifier and TypeMethodDescriptiongetScope()voidsetGrantType(String grantType) voidsetPassword(String password) voidvoidsetUsername(String username) toMap()Methods inherited from class io.micronaut.security.oauth2.grants.AbstractClientSecureGrant
getClientId, getClientSecret, setClientId, setClientSecretMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.security.oauth2.grants.SecureGrant
setClientId, setClientSecret 
- 
Constructor Details
- 
PasswordGrant
public PasswordGrant(AuthenticationRequest authenticationRequest, OauthClientConfiguration clientConfiguration) - Parameters:
 authenticationRequest- The authentication requestclientConfiguration- The client configuration
 
 - 
 - 
Method Details
- 
getGrantType
- Specified by:
 getGrantTypein classAbstractClientSecureGrant- Returns:
 - OAuth 2.0 Grant Type.
 
 - 
setGrantType
- Specified by:
 setGrantTypein classAbstractClientSecureGrant- Parameters:
 grantType- OAuth 2.0 Grant Type.
 - 
getUsername
- Returns:
 - An username
 
 - 
setUsername
- Parameters:
 username- An username
 - 
getPassword
- Returns:
 - An password
 
 - 
setPassword
- Parameters:
 password- An password
 - 
getScope
- Returns:
 - Requested scopes separed by spaces
 
 - 
setScope
- Parameters:
 scope- Requested scopes separed by spaces
 - 
toMap
- Specified by:
 toMapin interfaceAsMap- Overrides:
 toMapin classAbstractClientSecureGrant- Returns:
 - this object as a Map
 
 
 -