public interface OAuthDataProvider
| Modifier and Type | Method and Description |
|---|---|
List<OAuthPermission> |
convertScopeToPermissions(Client client,
List<String> requestedScopes)
Converts the requested scopes to the list of permissions.
|
ServerAccessToken |
createAccessToken(AccessTokenRegistration accessToken)
Create access token
|
ServerAccessToken |
getAccessToken(String accessToken)
Get access token
|
List<ServerAccessToken> |
getAccessTokens(Client client,
UserSubject subject)
Return all access tokens associated with a given client
|
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
|
List<RefreshToken> |
getRefreshTokens(Client client,
UserSubject subject)
Return all refresh tokens associated with a given client
|
ServerAccessToken |
refreshAccessToken(Client client,
String refreshToken,
List<String> requestedScopes)
Refresh access token
|
void |
revokeToken(Client client,
String tokenId,
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 clientOAuthServiceExceptionList<ServerAccessToken> getAccessTokens(Client client, UserSubject subject) throws OAuthServiceException
client - the clientsubject - the user subject, can be nullOAuthServiceExceptionList<RefreshToken> getRefreshTokens(Client client, UserSubject subject) throws OAuthServiceException
client - the clientsubject - the user subject, can be nullOAuthServiceExceptionvoid revokeToken(Client client, String tokenId, String tokenTypeHint) throws OAuthServiceException
token - token identifiertokenTypeHint - can be access_token or refresh_token or nullOAuthServiceExceptionList<OAuthPermission> convertScopeToPermissions(Client client, List<String> requestedScopes)
requestedScopes - the scopesApache CXF