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, 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 void linkAccessTokenToRefreshToken(RefreshToken rt, ServerAccessToken at)
protected void linkRefreshTokenToAccessToken(RefreshToken rt, 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)
public Client removeClient(String clientId)
ClientRegistrationProviderremoveClient in interface ClientRegistrationProviderclientId - the client idprotected ServerAccessToken revokeAccessToken(String accessTokenKey)
protected RefreshToken revokeRefreshToken(String refreshTokenKey)
protected abstract void saveAccessToken(ServerAccessToken serverToken)
protected abstract void saveRefreshToken(RefreshToken refreshToken)
protected abstract void doRevokeAccessToken(ServerAccessToken accessToken)
protected abstract void doRevokeRefreshToken(RefreshToken refreshToken)
protected abstract RefreshToken getRefreshToken(String refreshTokenKey)
protected abstract void doRemoveClient(Client c)
public void setInvisibleToClientScopes(List<String> invisibleToClientScopes)
public boolean isSupportPreauthorizedTokens()
public void setSupportPreauthorizedTokens(boolean supportPreauthorizedTokens)
protected static boolean isClientMatched(Client c, UserSubject resourceOwner)
protected static boolean isTokenMatched(ServerAccessToken token, Client c, UserSubject sub)
Apache CXF