Package com.datastax.astra.client.auth
Class UsernamePasswordTokenProvider
java.lang.Object
com.datastax.astra.client.auth.UsernamePasswordTokenProvider
- All Implemented Interfaces:
TokenProvider
,Supplier<String>
Creating a token with base64 encoded credentials.
- Author:
- Cedrick LUNVEN (@clunven)
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Default password for Cassandra.static final String
Default URL for local deployments.static final String
Default username for Cassandra.static final RetryHttpClient
Simple Client. -
Constructor Summary
ConstructorDescriptionUsing defaults settings.UsernamePasswordTokenProvider
(String username, String password) Full-fledged constructor. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.datastax.astra.client.auth.TokenProvider
get, getTokenAsString
-
Field Details
-
HTTP_CLIENT
Simple Client. -
DEFAULT_USERNAME
Default username for Cassandra.- See Also:
-
DEFAULT_CREDENTIALS
Default password for Cassandra.- See Also:
-
DEFAULT_URL
Default URL for local deployments.- See Also:
-
-
Constructor Details
-
UsernamePasswordTokenProvider
public UsernamePasswordTokenProvider()Using defaults settings. -
UsernamePasswordTokenProvider
Full-fledged constructor.- Parameters:
username
- usernamepassword
- password
-
-
Method Details
-
getToken
Generate or renew authentication token.- Specified by:
getToken
in interfaceTokenProvider
- Returns:
- String
-