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, wait
getAccessToken, getClient, removeAccessToken
public ServerAccessToken createAccessToken(AccessTokenRegistration accessToken) throws OAuthServiceException
OAuthDataProvider
createAccessToken
in interface OAuthDataProvider
accessToken
- the token registration infoOAuthServiceException
public ServerAccessToken refreshAccessToken(Client client, String refreshTokenKey, List<String> requestedScopes) throws OAuthServiceException
OAuthDataProvider
refreshAccessToken
in interface OAuthDataProvider
client
- the clientrefreshTokenKey
- refresh token keyrequestedScopes
- the scopes requested by the clientOAuthServiceException
public void revokeToken(Client client, String tokenKey, String tokenTypeHint) throws OAuthServiceException
OAuthDataProvider
revokeToken
in interface OAuthDataProvider
tokenKey
- token identifierOAuthServiceException
public List<OAuthPermission> convertScopeToPermissions(Client client, List<String> requestedScope)
OAuthDataProvider
convertScopeToPermissions
in interface OAuthDataProvider
public ServerAccessToken getPreauthorizedToken(Client client, List<String> requestedScopes, UserSubject subject, String grantType) throws OAuthServiceException
OAuthDataProvider
getPreauthorizedToken
in interface OAuthDataProvider
client
- ClientrequestedScopes
- the scopes requested by the clientsubject
- End User subjectOAuthServiceException
protected 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