public interface OAuthDataProvider
| 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
|
ServerAccessToken |
getAccessToken(String accessToken)
Get access token
|
Client |
getClient(String clientId)
Returns the previously registered third-party
Client |
ServerAccessToken |
getPreauthorizedToken(Client client,
List<String> requestedScopes,
UserSubject subject,
String grantType)
Get preauthorized access token
|
ServerAccessToken |
refreshAccessToken(Client client,
String refreshToken,
List<String> requestedScopes)
Refresh access token
|
void |
removeAccessToken(ServerAccessToken accessToken)
Removes the access token
The runtime will call this method if it finds that a token has expired
|
void |
revokeToken(Client client,
String token,
String tokenTypeHint)
Revokes a refresh or access token
|
Client getClient(String clientId) throws OAuthServiceException
ClientclientId - the client idOAuthServiceExceptionServerAccessToken createAccessToken(AccessTokenRegistration accessToken) throws OAuthServiceException
accessToken - the token registration infoOAuthServiceExceptionServerAccessToken getAccessToken(String accessToken) throws OAuthServiceException
accessToken - the token keyOAuthServiceExceptionServerAccessToken getPreauthorizedToken(Client client, List<String> requestedScopes, UserSubject subject, String grantType) throws OAuthServiceException
client - ClientrequestedScopes - the scopes requested by the clientsubject - End User subjectOAuthServiceExceptionServerAccessToken refreshAccessToken(Client client, String refreshToken, List<String> requestedScopes) throws OAuthServiceException
client - the clientrefreshToken - refresh token keyrequestedScopes - the scopes requested by the clientOAuthServiceExceptionvoid removeAccessToken(ServerAccessToken accessToken) throws OAuthServiceException
accessToken - the tokenOAuthServiceExceptionvoid revokeToken(Client client, String token, String tokenTypeHint) throws OAuthServiceException
token - token identifiertokenTypeHint - OAuthServiceExceptionList<OAuthPermission> convertScopeToPermissions(Client client, List<String> requestedScope)
requestedScope - Apache CXF