public interface PasswordGrantHandler extends GrantHandler
authorisation on success. Must throw an
GeneralException with an
invalid_grant
error code if the user credentials are invalid.
Implementations must be thread-safe.
Related specifications:
| Modifier and Type | Field and Description |
|---|---|
static com.nimbusds.oauth2.sdk.GrantType |
GRANT_TYPE
The handled grant type.
|
| Modifier and Type | Method and Description |
|---|---|
PasswordGrantAuthorization |
processGrant(com.nimbusds.oauth2.sdk.ResourceOwnerPasswordCredentialsGrant grant,
com.nimbusds.oauth2.sdk.Scope scope,
com.nimbusds.oauth2.sdk.id.ClientID clientID,
boolean confidentialClient,
com.nimbusds.openid.connect.sdk.rp.OIDCClientMetadata clientMetadata)
Handles a resource owner password credentials grant.
|
getGrantTypestatic final com.nimbusds.oauth2.sdk.GrantType GRANT_TYPE
PasswordGrantAuthorization processGrant(com.nimbusds.oauth2.sdk.ResourceOwnerPasswordCredentialsGrant grant, com.nimbusds.oauth2.sdk.Scope scope, com.nimbusds.oauth2.sdk.id.ClientID clientID, boolean confidentialClient, com.nimbusds.openid.connect.sdk.rp.OIDCClientMetadata clientMetadata) throws com.nimbusds.oauth2.sdk.GeneralException
grant - The resource owner password credentials
grant. Not null.scope - The requested scope, null if not
specified.clientID - The client identifier. Not null.confidentialClient - true if the client is confidential
and has been authenticated, else
false.clientMetadata - The OpenID Connect client metadata. Not
null.
If the user credentials are invalid the handler must throw a
exception with an
invalid_grant error code.
If the requested scope is invalid, unknown, malformed, or exceeds
the scope granted by the resource owner the handler must throw a
GeneralException with an
invalid_scope error code.
com.nimbusds.oauth2.sdk.GeneralException - If the grant is invalid, or another
exception was encountered.Copyright © 2015 Connect2id Ltd.. All Rights Reserved.