public class DefaultEncryptingOAuthDataProvider extends AbstractOAuthDataProvider implements ClientRegistrationProvider
Constructor and Description |
---|
DefaultEncryptingOAuthDataProvider(KeyProperties props) |
DefaultEncryptingOAuthDataProvider(SecretKey key) |
DefaultEncryptingOAuthDataProvider(String algo,
int keySize) |
Modifier and Type | Method and Description |
---|---|
ServerAccessToken |
getAccessToken(String accessToken)
Get access token
|
Client |
getClient(String clientId)
Returns the previously registered third-party
Client |
List<Client> |
getClients() |
void |
removeAccessToken(ServerAccessToken accessToken)
Removes the access token
The runtime will call this method if it finds that a token has expired
|
Client |
removeClient(String clientId) |
protected boolean |
revokeAccessToken(String accessTokenKey) |
protected RefreshToken |
revokeRefreshToken(Client client,
String refreshTokenKey) |
protected void |
saveAccessToken(ServerAccessToken serverToken) |
protected void |
saveRefreshToken(ServerAccessToken at,
RefreshToken refreshToken) |
void |
setClient(Client client) |
convertScopeToPermissions, createAccessToken, createNewAccessToken, createNewRefreshToken, doCreateAccessToken, doRefreshAccessToken, getPreauthorizedToken, refreshAccessToken, revokeToken, setAccessTokenLifetime, setRefreshTokenLifetime
protected SecretKey key
public DefaultEncryptingOAuthDataProvider(String algo, int keySize)
public DefaultEncryptingOAuthDataProvider(KeyProperties props)
public DefaultEncryptingOAuthDataProvider(SecretKey key)
public Client getClient(String clientId) throws OAuthServiceException
OAuthDataProvider
Client
getClient
in interface ClientRegistrationProvider
getClient
in interface OAuthDataProvider
clientId
- the client idOAuthServiceException
public void setClient(Client client)
setClient
in interface ClientRegistrationProvider
public Client removeClient(String clientId)
removeClient
in interface ClientRegistrationProvider
public List<Client> getClients()
getClients
in interface ClientRegistrationProvider
public ServerAccessToken getAccessToken(String accessToken) throws OAuthServiceException
OAuthDataProvider
getAccessToken
in interface OAuthDataProvider
accessToken
- the token keyOAuthServiceException
public void removeAccessToken(ServerAccessToken accessToken) throws OAuthServiceException
OAuthDataProvider
removeAccessToken
in interface OAuthDataProvider
accessToken
- the tokenOAuthServiceException
protected void saveAccessToken(ServerAccessToken serverToken)
saveAccessToken
in class AbstractOAuthDataProvider
protected boolean revokeAccessToken(String accessTokenKey)
revokeAccessToken
in class AbstractOAuthDataProvider
protected void saveRefreshToken(ServerAccessToken at, RefreshToken refreshToken)
saveRefreshToken
in class AbstractOAuthDataProvider
protected RefreshToken revokeRefreshToken(Client client, String refreshTokenKey)
revokeRefreshToken
in class AbstractOAuthDataProvider
Apache CXF