public abstract class AbstractOAuthDataProvider extends Object implements OAuthDataProvider, ClientRegistrationProvider
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractOAuthDataProvider() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAccessToken, getAccessTokens, getClient, getRefreshTokensgetClient, getClients, removeClient, setClientpublic ServerAccessToken createAccessToken(AccessTokenRegistration reg) throws OAuthServiceException
OAuthDataProvidercreateAccessToken in interface OAuthDataProviderreg - the token registration infoOAuthServiceExceptionprotected ServerAccessToken doCreateAccessToken(AccessTokenRegistration atReg)
public void removeAccessToken(ServerAccessToken token) throws OAuthServiceException
OAuthDataProviderremoveAccessToken in interface OAuthDataProvidertoken - the tokenOAuthServiceExceptionpublic ServerAccessToken refreshAccessToken(Client client, String refreshTokenKey, List<String> restrictedScopes) throws OAuthServiceException
OAuthDataProviderrefreshAccessToken in interface OAuthDataProviderclient - the clientrefreshTokenKey - refresh token keyrestrictedScopes - the scopes requested by the clientOAuthServiceExceptionpublic void revokeToken(Client client, String tokenKey, String tokenTypeHint) throws OAuthServiceException
OAuthDataProviderrevokeToken in interface OAuthDataProvidertokenTypeHint - can be access_token or refresh_token or nullOAuthServiceExceptionprotected void handleLinkedRefreshToken(ServerAccessToken accessToken)
protected void revokeAccessTokens(RefreshToken currentRefreshToken)
protected void unlinkRefreshAccessToken(RefreshToken rt, String tokenKey)
public List<OAuthPermission> convertScopeToPermissions(Client client, List<String> requestedScopes)
OAuthDataProviderconvertScopeToPermissions in interface OAuthDataProviderrequestedScopes - the scopespublic ServerAccessToken getPreauthorizedToken(Client client, List<String> requestedScopes, UserSubject sub, String grantType) throws OAuthServiceException
OAuthDataProvidergetPreauthorizedToken in interface OAuthDataProviderclient - ClientrequestedScopes - the scopes requested by the clientsub - End User subjectOAuthServiceExceptionprotected ServerAccessToken createNewAccessToken(Client client)
protected RefreshToken updateRefreshToken(RefreshToken rt, ServerAccessToken at)
protected RefreshToken createNewRefreshToken(ServerAccessToken at)
protected RefreshToken doCreateNewRefreshToken(ServerAccessToken at)
protected ServerAccessToken doRefreshAccessToken(Client client, RefreshToken oldRefreshToken, List<String> restrictedScopes)
public void setAccessTokenLifetime(long accessTokenLifetime)
public void setRefreshTokenLifetime(long refreshTokenLifetime)
public void setRecycleRefreshTokens(boolean recycleRefreshTokens)
public void init()
public void close()
public Map<String,OAuthPermission> getPermissionMap()
public void setPermissionMap(Map<String,OAuthPermission> permissionMap)
public MessageContext getMessageContext()
public void setMessageContext(MessageContext messageContext)
protected void removeClientTokens(Client c)
protected abstract void saveAccessToken(ServerAccessToken serverToken)
protected abstract void saveRefreshToken(ServerAccessToken at, RefreshToken refreshToken)
protected abstract ServerAccessToken revokeAccessToken(String accessTokenKey)
protected abstract RefreshToken revokeRefreshToken(String refreshTokenKey)
protected abstract RefreshToken getRefreshToken(String refreshTokenKey)
public void setInvisibleToClientScopes(List<String> invisibleToClientScopes)
public boolean isSupportPreauthorizedTokens()
public void setSupportPreauthorizedTokens(boolean supportPreauthorizedTokens)
Apache CXF