public class JCacheOAuthDataProvider extends AbstractOAuthDataProvider
| Modifier and Type | Field and Description |
|---|---|
static String |
ACCESS_TOKEN_CACHE_KEY |
protected CacheManager |
cacheManager |
static String |
CLIENT_CACHE_KEY |
static String |
DEFAULT_CONFIG_URL |
static String |
REFRESH_TOKEN_CACHE_KEY |
| Constructor and Description |
|---|
JCacheOAuthDataProvider() |
JCacheOAuthDataProvider(boolean storeJwtTokenKeyOnly) |
JCacheOAuthDataProvider(String configFileURL,
Bus bus) |
JCacheOAuthDataProvider(String configFileURL,
Bus bus,
boolean storeJwtTokenKeyOnly) |
JCacheOAuthDataProvider(String configFileURL,
Bus bus,
String clientCacheKey,
String accessTokenCacheKey,
String refreshTokenCacheKey) |
JCacheOAuthDataProvider(String configFileURL,
Bus bus,
String clientCacheKey,
String accessTokenCacheKey,
String refreshTokenCacheKey,
boolean storeJwtTokenKeyOnly) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected static <K,V> <any> |
createCache(CacheManager cacheManager,
String cacheKey,
Class<K> keyType,
Class<V> valueType) |
protected static CacheManager |
createCacheManager(String configFile,
Bus bus) |
Client |
doGetClient(String clientId) |
protected void |
doRemoveClient(Client c) |
protected void |
doRevokeAccessToken(ServerAccessToken at) |
protected void |
doRevokeRefreshToken(RefreshToken rt) |
ServerAccessToken |
getAccessToken(String accessTokenKey)
Get access token
|
List<ServerAccessToken> |
getAccessTokens(Client c,
UserSubject sub)
Return all access tokens associated with a given client
|
List<Client> |
getClients(UserSubject resourceOwner)
Get a list of clients registered by a resource owner.
|
protected ServerAccessToken |
getJwtAccessToken(String key) |
protected List<ServerAccessToken> |
getJwtAccessTokens(Client client,
UserSubject sub) |
protected RefreshToken |
getRefreshToken(String refreshTokenKey) |
List<RefreshToken> |
getRefreshTokens(Client c,
UserSubject sub)
Return all refresh tokens associated with a given client
|
protected static <V extends ServerAccessToken> |
getToken(<any> cache,
String key) |
protected static <K,V extends ServerAccessToken> |
getTokens(<any> cache,
Client client,
UserSubject sub) |
protected static boolean |
isExpired(ServerAccessToken token) |
boolean |
isStoreJwtTokenKeyOnly() |
protected void |
saveAccessToken(ServerAccessToken serverToken) |
protected void |
saveRefreshToken(RefreshToken refreshToken) |
void |
setClient(Client client)
Set a Client
|
void |
setJwtTokenConsumer(JoseJwtConsumer jwtTokenConsumer) |
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, updateRefreshTokenpublic static final String CLIENT_CACHE_KEY
public static final String ACCESS_TOKEN_CACHE_KEY
public static final String REFRESH_TOKEN_CACHE_KEY
public static final String DEFAULT_CONFIG_URL
protected final CacheManager cacheManager
public JCacheOAuthDataProvider(boolean storeJwtTokenKeyOnly)
throws Exception
Exceptionpublic JCacheOAuthDataProvider(String configFileURL, Bus bus) throws Exception
Exceptionpublic JCacheOAuthDataProvider(String configFileURL, Bus bus, boolean storeJwtTokenKeyOnly) throws Exception
Exceptionpublic JCacheOAuthDataProvider(String configFileURL, Bus bus, String clientCacheKey, String accessTokenCacheKey, String refreshTokenCacheKey) throws Exception
Exceptionpublic Client doGetClient(String clientId) throws OAuthServiceException
doGetClient in class AbstractOAuthDataProviderOAuthServiceExceptionpublic void setClient(Client client)
ClientRegistrationProviderclient - the clientprotected void doRemoveClient(Client c)
doRemoveClient in class AbstractOAuthDataProviderpublic List<Client> getClients(UserSubject resourceOwner)
ClientRegistrationProviderresourceOwner - the resource owner, can be nullpublic List<ServerAccessToken> getAccessTokens(Client c, UserSubject sub)
OAuthDataProviderc - the clientsub - the user subject, can be nullpublic List<RefreshToken> getRefreshTokens(Client c, UserSubject sub)
OAuthDataProviderc - the clientsub - the user subject, can be nullpublic ServerAccessToken getAccessToken(String accessTokenKey) throws OAuthServiceException
OAuthDataProvideraccessTokenKey - the token keyOAuthServiceExceptionprotected void doRevokeAccessToken(ServerAccessToken at)
doRevokeAccessToken in class AbstractOAuthDataProviderprotected RefreshToken getRefreshToken(String refreshTokenKey)
getRefreshToken in class AbstractOAuthDataProviderprotected void doRevokeRefreshToken(RefreshToken rt)
doRevokeRefreshToken in class AbstractOAuthDataProviderprotected void saveAccessToken(ServerAccessToken serverToken)
saveAccessToken in class AbstractOAuthDataProviderprotected void saveRefreshToken(RefreshToken refreshToken)
saveRefreshToken in class AbstractOAuthDataProviderpublic void close()
close in class AbstractOAuthDataProviderprotected static <V extends ServerAccessToken> V getToken(<any> cache, String key)
protected ServerAccessToken getJwtAccessToken(String key)
protected static <K,V extends ServerAccessToken> List<V> getTokens(<any> cache, Client client, UserSubject sub)
protected List<ServerAccessToken> getJwtAccessTokens(Client client, UserSubject sub)
protected static boolean isExpired(ServerAccessToken token)
protected static CacheManager createCacheManager(String configFile, Bus bus) throws Exception
Exceptionprotected static <K,V> <any> createCache(CacheManager cacheManager,
String cacheKey,
Class<K> keyType,
Class<V> valueType)
public boolean isStoreJwtTokenKeyOnly()
public void setJwtTokenConsumer(JoseJwtConsumer jwtTokenConsumer)
Apache CXF