public final class CredentialsProvider
extends java.lang.Object
Credentials.
Credentials need to be provided by the app backend server. The backend server is
responsible to fetch the credentials from the wallee web service. This way the backend server can
bind the credentials to the session resp. the app user. This ensures that the backend server
controls at any point what the user is allowed to do.
The provider is ensures that the credentials are properly cached and refreshed whenever they
are required. For a more persistent storage the CredentialsStore is used.
The implementation is thread-safe and as such the provider can be called from multiple threads.
| Constructor and Description |
|---|
CredentialsProvider(CredentialsStore store,
CredentialsFetcher fetcher) |
| Modifier and Type | Method and Description |
|---|---|
void |
getCredentials(AsynchronousCallback<Credentials> executor)
This method can be called to execute a command which requires a current set of
Credentials. |
public CredentialsProvider(CredentialsStore store, CredentialsFetcher fetcher)
public void getCredentials(AsynchronousCallback<Credentials> executor)
Credentials. The method is executed asynchronously when required. When the credentials are
already present and valid the executor is called immediately.executor - the executor which should be invoked once the credentials are onTokenSelectionViewReady to be
used.