Class OAuth2TokenPersistentStore
-
- All Implemented Interfaces:
-
com.sap.cloud.mobile.foundation.authentication.OAuth2TokenStore
public class OAuth2TokenPersistentStore implements OAuth2TokenStore
This class implements OAuth2TokenStore by persisting credentials in com.sap.cloud.mobile.foundation.securestore.SecureKeyValueStore
-
-
Constructor Summary
Constructors Constructor Description OAuth2TokenPersistentStore(SecureKeyValueStore secureStore)
-
Method Summary
Modifier and Type Method Description synchronized void
storeToken(@NonNull() OAuth2Token oauth2Token, @NonNull() String url)
Called when a OAuth2Processor needs to store a token. synchronized OAuth2Token
getToken(@NonNull() String url)
Called when a OAuth2Processor wants a token. synchronized void
deleteToken(@NonNull() String url)
Called when a token should be deleted. -
-
Constructor Detail
-
OAuth2TokenPersistentStore
OAuth2TokenPersistentStore(SecureKeyValueStore secureStore)
-
-
Method Detail
-
storeToken
synchronized void storeToken(@NonNull() OAuth2Token oauth2Token, @NonNull() String url)
Called when a OAuth2Processor needs to store a token.
- Parameters:
oauth2Token
- the token to be storedurl
- the url the token is associated to
-
getToken
@Nullable() synchronized OAuth2Token getToken(@NonNull() String url)
Called when a OAuth2Processor wants a token.
- Returns:
the token associated with the url, null if not found
-
deleteToken
synchronized void deleteToken(@NonNull() String url)
Called when a token should be deleted.
- Parameters:
url
- The url which the token is no longer needed.
-
-
-
-