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 List<String> |
getApprovedScopes(AuthorizationCodeRegistration reg) |
protected String |
getCode(AuthorizationCodeRegistration reg) |
long |
getGrantLifetime() |
protected long |
getIssuedAt() |
ServerAuthorizationCodeGrant |
removeCodeGrant(String code)
Returns the previously registered
ServerAuthorizationCodeGrant |
protected void |
saveAuthorizationGrant(ServerAuthorizationCodeGrant grant) |
void |
setGrantLifetime(long lifetime) |
createCache, getAccessToken, getCacheValue, getClient, getClients, putCacheValue, removeAccessToken, removeClient, revokeAccessToken, revokeRefreshToken, saveAccessToken, saveRefreshToken, setClient
convertScopeToPermissions, createAccessToken, createNewAccessToken, createNewRefreshToken, doCreateAccessToken, doRefreshAccessToken, getPreauthorizedToken, refreshAccessToken, revokeToken, setAccessTokenLifetime, setRefreshTokenLifetime
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
convertScopeToPermissions, createAccessToken, getAccessToken, getClient, getPreauthorizedToken, refreshAccessToken, removeAccessToken, revokeToken
public static final String CODE_GRANT_CACHE_KEY
protected DefaultEHCacheCodeDataProvider()
protected DefaultEHCacheCodeDataProvider(String configFileURL, Bus bus)
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 ServerAuthorizationCodeGrant removeCodeGrant(String code) throws OAuthServiceException
AuthorizationCodeDataProvider
ServerAuthorizationCodeGrant
removeCodeGrant
in interface AuthorizationCodeDataProvider
code
- the code grantOAuthServiceException
- if no grant with this code is availableServerAuthorizationCodeGrant
protected ServerAuthorizationCodeGrant doCreateCodeGrant(AuthorizationCodeRegistration reg) throws OAuthServiceException
OAuthServiceException
protected List<String> getApprovedScopes(AuthorizationCodeRegistration reg)
protected String getCode(AuthorizationCodeRegistration reg)
public long getGrantLifetime()
public void setGrantLifetime(long lifetime)
protected long getIssuedAt()
protected void saveAuthorizationGrant(ServerAuthorizationCodeGrant grant)
Apache CXF