public class JCacheCodeDataProvider extends JCacheOAuthDataProvider 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 |
JCacheCodeDataProvider() |
protected |
JCacheCodeDataProvider(String configFileURL,
Bus bus) |
protected |
JCacheCodeDataProvider(String configFileURL,
Bus bus,
String clientCacheKey,
String codeCacheKey,
String accessTokenKey,
String refreshTokenKey) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
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 void |
doRemoveClient(Client c) |
protected ServerAuthorizationCodeGrant |
getCodeGrant(String code) |
List<ServerAuthorizationCodeGrant> |
getCodeGrants(Client c,
UserSubject sub)
Return the list of code grants associated with a given client
|
protected static boolean |
isExpired(ServerAuthorizationCodeGrant grant) |
ServerAuthorizationCodeGrant |
removeCodeGrant(String code)
Returns the previously registered
ServerAuthorizationCodeGrant |
void |
setCodeLifetime(long codeLifetime) |
createCache, createCacheManager, doGetClient, doRevokeAccessToken, doRevokeRefreshToken, getAccessToken, getAccessTokens, getClients, getJwtAccessToken, getJwtAccessTokens, getRefreshToken, getRefreshTokens, getToken, getTokens, isExpired, isStoreJwtTokenKeyOnly, saveAccessToken, saveRefreshToken, setClient, setJwtTokenConsumerauthenticateUnregisteredClient, 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, updateRefreshTokenclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconvertScopeToPermissions, createAccessToken, getAccessToken, getAccessTokens, getClient, getPreauthorizedToken, getRefreshTokens, refreshAccessToken, revokeTokenpublic static final String CODE_GRANT_CACHE_KEY
protected JCacheCodeDataProvider(String configFileURL, Bus bus) throws Exception
Exceptionprotected void doRemoveClient(Client c)
doRemoveClient in class JCacheOAuthDataProviderpublic ServerAuthorizationCodeGrant createCodeGrant(AuthorizationCodeRegistration reg) throws OAuthServiceException
AuthorizationCodeDataProviderClient requesting the access to
the resource owner's resourcescreateCodeGrant in interface AuthorizationCodeDataProviderreg - information about the client code grant requestOAuthServiceExceptionAuthorizationCodeRegistration,
ServerAuthorizationCodeGrantpublic List<ServerAuthorizationCodeGrant> getCodeGrants(Client c, UserSubject sub)
AuthorizationCodeDataProvidergetCodeGrants in interface AuthorizationCodeDataProvidersub - the user subject, can be nullServerAuthorizationCodeGrantpublic ServerAuthorizationCodeGrant removeCodeGrant(String code) throws OAuthServiceException
AuthorizationCodeDataProviderServerAuthorizationCodeGrantremoveCodeGrant in interface AuthorizationCodeDataProvidercode - the code grantOAuthServiceException - if no grant with this code is availableServerAuthorizationCodeGrantpublic void setCodeLifetime(long codeLifetime)
protected ServerAuthorizationCodeGrant getCodeGrant(String code) throws OAuthServiceException
OAuthServiceExceptionprotected static boolean isExpired(ServerAuthorizationCodeGrant grant)
public void close()
close in class JCacheOAuthDataProviderApache CXF