public class PasswordAuthenticator extends Object implements Authenticator
| Modifier and Type | Class and Description |
|---|---|
static class |
PasswordAuthenticator.Builder
Provides customization to the
PasswordAuthenticator. |
| Modifier and Type | Method and Description |
|---|---|
void |
authHttpRequest(ServiceType serviceType,
com.couchbase.client.core.deps.io.netty.handler.codec.http.HttpRequest request)
Allows to add authentication credentials to the http request for the given service.
|
void |
authKeyValueConnection(EndpointContext ctx,
com.couchbase.client.core.deps.io.netty.channel.ChannelPipeline pipeline)
Allows the authenticator to add KV handlers during connection bootstrap to perform
authentication.
|
static PasswordAuthenticator.Builder |
builder()
Creates a new
PasswordAuthenticator.Builder which allows to customize this authenticator. |
static PasswordAuthenticator |
create(String username,
String password)
Creates a new password authenticator with the default settings.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitapplyTlsProperties, supportsNonTls, supportsTlspublic static PasswordAuthenticator.Builder builder()
PasswordAuthenticator.Builder which allows to customize this authenticator.public static PasswordAuthenticator create(String username, String password)
username - the username to use for all authentication.password - the password to use alognside the username.PasswordAuthenticator.public void authKeyValueConnection(EndpointContext ctx, com.couchbase.client.core.deps.io.netty.channel.ChannelPipeline pipeline)
AuthenticatorauthKeyValueConnection in interface Authenticatorctx - the endpoint context.pipeline - the pipeline when the endpoint is constructed.public void authHttpRequest(ServiceType serviceType, com.couchbase.client.core.deps.io.netty.handler.codec.http.HttpRequest request)
AuthenticatorauthHttpRequest in interface AuthenticatorserviceType - the service for this request.request - the http request.Copyright © 2020 Couchbase, Inc.. All rights reserved.