public class DefaultEHCacheCodeDataProvider extends DefaultEHCacheOAuthDataProvider implements AuthorizationCodeDataProvider
Modifier and Type | Field and Description |
---|---|
static String |
CODE_GRANT_CACHE_KEY |
ACCESS_TOKEN_CACHE_KEY, cacheManager, CLIENT_CACHE_KEY, DEFAULT_CONFIG_URL, REFRESH_TOKEN_CACHE_KEY
Modifier | Constructor and Description |
---|---|
protected |
DefaultEHCacheCodeDataProvider() |
protected |
DefaultEHCacheCodeDataProvider(String configFileURL,
Bus bus) |
protected |
DefaultEHCacheCodeDataProvider(String configFileURL,
Bus bus,
String clientCacheKey,
String codeCacheKey,
String accessTokenKey,
String refreshTokenKey) |
Modifier and Type | Method and Description |
---|---|
ServerAuthorizationCodeGrant |
createCodeGrant(AuthorizationCodeRegistration reg)
Creates a temporarily code grant which will capture the
information about the
Client requesting the access to
the resource owner's resources |
protected ServerAuthorizationCodeGrant |
doCreateCodeGrant(AuthorizationCodeRegistration reg) |
protected void |
doRemoveClient(Client c) |
ServerAuthorizationCodeGrant |
getCodeGrant(String code) |
List<ServerAuthorizationCodeGrant> |
getCodeGrants(Client c,
UserSubject sub)
Return the list of code grants associated with a given client
|
protected void |
removeClientCodeGrants(Client c) |
ServerAuthorizationCodeGrant |
removeCodeGrant(String code)
Returns the previously registered
ServerAuthorizationCodeGrant |
protected void |
saveCodeGrant(ServerAuthorizationCodeGrant grant) |
void |
setCodeLifetime(long codeLifetime) |
close, createCache, doGetClient, doRevokeAccessToken, doRevokeRefreshToken, getAccessToken, getAccessTokens, getCacheValue, getClients, getRefreshToken, getRefreshTokens, isStoreJwtTokenKeyOnly, putCacheValue, saveAccessToken, saveRefreshToken, setClient, setJwtTokenConsumer, setStoreJwtTokenKeyOnly
authenticateUnregisteredClient, checkRequestedScopes, convertScopeToPermissions, convertSingleScopeToPermission, createAccessToken, createClientCredentialsClient, createJwtAccessToken, createNewAccessToken, createNewRefreshToken, doCreateAccessToken, doCreateNewRefreshToken, doRefreshAccessToken, getClient, getCurrentClientSecret, getCurrentRequestedGrantType, getCurrentTokenRequestParams, getDefaultScopes, getInvisibleToClientScopes, getJwtAccessTokenClaimMap, getJwtAccessTokenProducer, getMessageContext, getPermissionMap, getPreauthorizedToken, getRequiredScopes, handleLinkedRefreshToken, init, isClientMatched, isRecycleRefreshTokens, isRefreshTokenSupported, isSupportPreauthorizedTokens, isTokenMatched, isUseJwtFormatForAccessTokens, linkAccessTokenToRefreshToken, linkRefreshTokenToAccessToken, processJwtAccessToken, refreshAccessToken, removeClient, removeClientTokens, revokeAccessToken, revokeAccessTokens, revokeRefreshToken, revokeToken, setAccessTokenLifetime, setAuthenticationStrategy, setClients, setDefaultScopes, setInvisibleToClientScopes, setJwtAccessTokenClaimMap, setJwtAccessTokenProducer, setMessageContext, setPermissionMap, setRecycleRefreshTokens, setRefreshTokenLifetime, setRequiredScopes, setSupportedScopes, setSupportPreauthorizedTokens, setUseJwtFormatForAccessTokens, unlinkRefreshAccessToken, updateExistingRefreshToken, updateRefreshToken
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
convertScopeToPermissions, createAccessToken, getAccessToken, getAccessTokens, getClient, getPreauthorizedToken, getRefreshTokens, refreshAccessToken, revokeToken
public static final String CODE_GRANT_CACHE_KEY
protected DefaultEHCacheCodeDataProvider()
protected DefaultEHCacheCodeDataProvider(String configFileURL, Bus bus)
protected void doRemoveClient(Client c)
doRemoveClient
in class DefaultEHCacheOAuthDataProvider
protected void removeClientCodeGrants(Client c)
public ServerAuthorizationCodeGrant createCodeGrant(AuthorizationCodeRegistration reg) throws OAuthServiceException
AuthorizationCodeDataProvider
Client
requesting the access to
the resource owner's resourcescreateCodeGrant
in interface AuthorizationCodeDataProvider
reg
- information about the client code grant requestOAuthServiceException
AuthorizationCodeRegistration
,
ServerAuthorizationCodeGrant
protected ServerAuthorizationCodeGrant doCreateCodeGrant(AuthorizationCodeRegistration reg) throws OAuthServiceException
OAuthServiceException
public List<ServerAuthorizationCodeGrant> getCodeGrants(Client c, UserSubject sub)
AuthorizationCodeDataProvider
getCodeGrants
in interface AuthorizationCodeDataProvider
sub
- the user subject, can be nullServerAuthorizationCodeGrant
public ServerAuthorizationCodeGrant removeCodeGrant(String code) throws OAuthServiceException
AuthorizationCodeDataProvider
ServerAuthorizationCodeGrant
removeCodeGrant
in interface AuthorizationCodeDataProvider
code
- the code grantOAuthServiceException
- if no grant with this code is availableServerAuthorizationCodeGrant
public ServerAuthorizationCodeGrant getCodeGrant(String code) throws OAuthServiceException
OAuthServiceException
protected void saveCodeGrant(ServerAuthorizationCodeGrant grant)
public void setCodeLifetime(long codeLifetime)
Apache CXF