Class CredentialsManager
java.lang.Object
com.clickhouse.client.api.internal.CredentialsManager
Manages mutable authentication-related client settings.
This class uses an atomic reference to ensure thread-safe credential updates.
Updates are non-blocking and will be applied to newly initiated requests
immediately without affecting ongoing queries.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyCredentials(Map<String, Object> target) voidsetAccessToken(String accessToken) Replaces the current credentials with a bearer token.voidsetCredentials(String username, String password) Replaces the current username/password credentials.
-
Field Details
-
AUTHORIZATION_HEADER_KEY
-
AUTH_HEADER_BEARER_PREFIX
- See Also:
-
-
Constructor Details
-
CredentialsManager
-
-
Method Details
-
applyCredentials
-
setCredentials
Replaces the current username/password credentials.Updates are applied atomically and take effect for newly initiated requests without blocking or requiring external synchronization.
-
setAccessToken
Replaces the current credentials with a bearer token.Updates are applied atomically and take effect for newly initiated requests without blocking or requiring external synchronization.
-