public abstract class AbstractOAuthDataProvider extends Object implements OAuthDataProvider
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractOAuthDataProvider() |
| Modifier and Type | Method and Description |
|---|---|
List<OAuthPermission> |
convertScopeToPermissions(Client client,
List<String> requestedScope)
Converts the requested scope to the list of permissions
|
ServerAccessToken |
createAccessToken(AccessTokenRegistration accessToken)
Create access token
|
protected ServerAccessToken |
createNewAccessToken(Client client) |
protected RefreshToken |
createNewRefreshToken(ServerAccessToken at) |
protected ServerAccessToken |
doCreateAccessToken(AccessTokenRegistration accessToken) |
protected ServerAccessToken |
doRefreshAccessToken(Client client,
RefreshToken oldRefreshToken,
List<String> requestedScopes) |
ServerAccessToken |
getPreauthorizedToken(Client client,
List<String> requestedScopes,
UserSubject subject,
String grantType)
Get preauthorized access token
|
ServerAccessToken |
refreshAccessToken(Client client,
String refreshTokenKey,
List<String> requestedScopes)
Refresh access token
|
protected abstract boolean |
revokeAccessToken(String accessTokenKey) |
protected abstract RefreshToken |
revokeRefreshToken(Client client,
String refreshTokenKey) |
void |
revokeToken(Client client,
String tokenKey,
String tokenTypeHint)
Revokes a refresh or access token
|
protected abstract void |
saveAccessToken(ServerAccessToken serverToken) |
protected abstract void |
saveRefreshToken(ServerAccessToken at,
RefreshToken refreshToken) |
void |
setAccessTokenLifetime(long accessTokenLifetime) |
void |
setRefreshTokenLifetime(long refreshTokenLifetime) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAccessToken, getClient, removeAccessTokenpublic ServerAccessToken createAccessToken(AccessTokenRegistration accessToken) throws OAuthServiceException
OAuthDataProvidercreateAccessToken in interface OAuthDataProvideraccessToken - the token registration infoOAuthServiceExceptionpublic ServerAccessToken refreshAccessToken(Client client, String refreshTokenKey, List<String> requestedScopes) throws OAuthServiceException
OAuthDataProviderrefreshAccessToken in interface OAuthDataProviderclient - the clientrefreshTokenKey - refresh token keyrequestedScopes - the scopes requested by the clientOAuthServiceExceptionpublic void revokeToken(Client client, String tokenKey, String tokenTypeHint) throws OAuthServiceException
OAuthDataProviderrevokeToken in interface OAuthDataProvidertokenKey - token identifierOAuthServiceExceptionpublic List<OAuthPermission> convertScopeToPermissions(Client client, List<String> requestedScope)
OAuthDataProviderconvertScopeToPermissions in interface OAuthDataProviderpublic ServerAccessToken getPreauthorizedToken(Client client, List<String> requestedScopes, UserSubject subject, String grantType) throws OAuthServiceException
OAuthDataProvidergetPreauthorizedToken in interface OAuthDataProviderclient - ClientrequestedScopes - the scopes requested by the clientsubject - End User subjectOAuthServiceExceptionprotected ServerAccessToken doCreateAccessToken(AccessTokenRegistration accessToken)
protected ServerAccessToken createNewAccessToken(Client client)
protected RefreshToken createNewRefreshToken(ServerAccessToken at)
protected ServerAccessToken doRefreshAccessToken(Client client, RefreshToken oldRefreshToken, List<String> requestedScopes)
public void setAccessTokenLifetime(long accessTokenLifetime)
public void setRefreshTokenLifetime(long refreshTokenLifetime)
protected abstract void saveAccessToken(ServerAccessToken serverToken)
protected abstract void saveRefreshToken(ServerAccessToken at, RefreshToken refreshToken)
protected abstract boolean revokeAccessToken(String accessTokenKey)
protected abstract RefreshToken revokeRefreshToken(Client client, String refreshTokenKey)
Apache CXF