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
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
List<ServerAccessToken> getAccessTokens(Client client, UserSubject subject) throws OAuthServiceException
client
- the clientsubject
- the user subject, can be nullOAuthServiceException
List<RefreshToken> getRefreshTokens(Client client, UserSubject subject) throws OAuthServiceException
client
- the clientsubject
- the user subject, can be nullOAuthServiceException
void revokeToken(Client client, String tokenId, String tokenTypeHint) throws OAuthServiceException
client
- the clienttokenId
- token identifiertokenTypeHint
- can be access_token or refresh_token or nullOAuthServiceException
List<OAuthPermission> convertScopeToPermissions(Client client, List<String> requestedScopes)
requestedScopes
- the scopesApache CXF