public interface GrantHandler
| Modifier and Type | Field and Description |
|---|---|
static org.slf4j.Logger |
LOG |
| Modifier and Type | Method and Description |
|---|---|
default Optional<com.nimbusds.oauth2.sdk.AccessTokenResponse> |
checkTokens(OAuthDAO oauthDAO,
String authUser,
String grantType,
String clientId,
com.nimbusds.oauth2.sdk.Scope scope)
Check the previous generated token state
|
void |
init(org.wso2.carbon.auth.core.api.UserNameMapper userNameMapper,
OAuthDAO oauthDAO,
org.wso2.carbon.auth.user.mgt.UserStoreManager userStoreManager,
org.wso2.carbon.auth.client.registration.dao.ApplicationDAO applicationDAO)
Initialise the grant type implementations with DAO
|
default boolean |
isAuthorizedClient(org.wso2.carbon.auth.client.registration.model.Application application,
String grantType)
Check is application is authorised
|
void |
process(String authorization,
AccessTokenContext context,
Map<String,String> queryParameters)
Process grant type request to generate access token
|
boolean |
validateGrant(String authorization,
AccessTokenContext context,
Map<String,String> queryParameters)
Validate Grant values to process Token
|
default boolean |
validateScopes(AccessTokenContext context)
Validate requested scope and return allowed scopes
|
boolean validateGrant(String authorization, AccessTokenContext context, Map<String,String> queryParameters) throws org.wso2.carbon.auth.core.exception.AuthException
authorization - Authorization headercontext - AccessTokenContext object that stores context information during request processingqueryParameters - Map of query parameters sentorg.wso2.carbon.auth.core.exception.AuthException - When an grantHandler Error Occurredvoid process(String authorization, AccessTokenContext context, Map<String,String> queryParameters) throws org.wso2.carbon.auth.core.exception.AuthException
authorization - Authorization headercontext - AccessTokenContext object that stores context information during request processingqueryParameters - Map of query parameters sentorg.wso2.carbon.auth.core.exception.AuthException - When an grantHandler Error Occurredvoid init(org.wso2.carbon.auth.core.api.UserNameMapper userNameMapper,
OAuthDAO oauthDAO,
org.wso2.carbon.auth.user.mgt.UserStoreManager userStoreManager,
org.wso2.carbon.auth.client.registration.dao.ApplicationDAO applicationDAO)
userNameMapper - Username mapper objectoauthDAO - OAuthDAO instanceuserStoreManager - user store manager instanceapplicationDAO - ApplicationDAO instancedefault boolean isAuthorizedClient(org.wso2.carbon.auth.client.registration.model.Application application,
String grantType)
application - Application objectgrantType - requested grant typedefault boolean validateScopes(AccessTokenContext context)
context - AccessTokenContextdefault Optional<com.nimbusds.oauth2.sdk.AccessTokenResponse> checkTokens(OAuthDAO oauthDAO, String authUser, String grantType, String clientId, com.nimbusds.oauth2.sdk.Scope scope)
oauthDAO - oauth DAO instanceauthUser - authenticated usergrantType - requested grant typeclientId - requested consumer keyscope - requested scopesCopyright © 2018 WSO2. All rights reserved.