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) |
protected |
JCacheCodeDataProvider(String configFileURL,
Bus bus,
String clientCacheKey,
String codeCacheKey,
String accessTokenKey,
String refreshTokenKey,
boolean storeJwtTokenKeyOnly) |
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, linkRefreshTokenToAccessToken, saveAccessToken, saveRefreshToken, setClient, setJwtTokenConsumer
authenticateUnregisteredClient, checkRequestedScopes, convertScopeToPermissions, convertSingleScopeToPermission, createAccessToken, createClientCredentialsClient, createJwtAccessToken, createNewAccessToken, createNewRefreshToken, doCreateAccessToken, doCreateNewRefreshToken, doRefreshAccessToken, getClient, getCurrentClientSecret, getCurrentRequestedGrantType, getCurrentTokenRequestParams, getDefaultScopes, getInvisibleToClientScopes, getIssuer, getJwtAccessTokenClaimMap, getJwtAccessTokenProducer, getMessageContext, getPermissionMap, getPreauthorizedToken, getRequiredScopes, handleLinkedRefreshToken, init, isClientMatched, isPersistJwtEncoding, isRecycleRefreshTokens, isRefreshTokenSupported, isSupportPreauthorizedTokens, isTokenMatched, isUseJwtFormatForAccessTokens, linkAccessTokenToRefreshToken, processJwtAccessToken, refreshAccessToken, removeClient, removeClientTokens, revokeAccessToken, revokeAccessTokens, revokeRefreshToken, revokeToken, setAccessTokenLifetime, setAuthenticationStrategy, setClients, setDefaultScopes, setInvisibleToClientScopes, setIssuer, setJwtAccessTokenClaimMap, setJwtAccessTokenProducer, setMessageContext, setPermissionMap, setPersistJwtEncoding, 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 JCacheCodeDataProvider()
protected JCacheCodeDataProvider(String configFileURL, Bus bus, String clientCacheKey, String codeCacheKey, String accessTokenKey, String refreshTokenKey)
protected void doRemoveClient(Client c)
doRemoveClient
in class JCacheOAuthDataProvider
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
public List<ServerAuthorizationCodeGrant> getCodeGrants(Client c, UserSubject sub)
AuthorizationCodeDataProvider
getCodeGrants
in interface AuthorizationCodeDataProvider
c
- the clientsub
- 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 void setCodeLifetime(long codeLifetime)
protected ServerAuthorizationCodeGrant getCodeGrant(String code) throws OAuthServiceException
OAuthServiceException
protected static boolean isExpired(ServerAuthorizationCodeGrant grant)
public void close()
close
in class JCacheOAuthDataProvider
Apache CXF