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
Client
clientId
- the client idOAuthServiceException
ServerAccessToken createAccessToken(AccessTokenRegistration accessToken) throws OAuthServiceException
accessToken
- the token registration infoOAuthServiceException
ServerAccessToken getAccessToken(String accessToken) throws OAuthServiceException
accessToken
- the token keyOAuthServiceException
ServerAccessToken getPreauthorizedToken(Client client, List<String> requestedScopes, UserSubject subject, String grantType) throws OAuthServiceException
client
- ClientrequestedScopes
- the scopes requested by the clientsubject
- End User subjectOAuthServiceException
ServerAccessToken refreshAccessToken(Client client, String refreshToken, List<String> requestedScopes) throws OAuthServiceException
client
- the clientrefreshToken
- refresh token keyrequestedScopes
- the scopes requested by the clientOAuthServiceException
void removeAccessToken(ServerAccessToken accessToken) throws OAuthServiceException
accessToken
- the tokenOAuthServiceException
void revokeToken(Client client, String token, String tokenTypeHint) throws OAuthServiceException
token
- token identifiertokenTypeHint
- OAuthServiceException
List<OAuthPermission> convertScopeToPermissions(Client client, List<String> requestedScope)
requestedScope
- Apache CXF