Package com.couchbase.client.core.env
Class AuthenticatorWrapper
java.lang.Object
com.couchbase.client.core.env.AuthenticatorWrapper
- All Implemented Interfaces:
Authenticator
- Direct Known Subclasses:
DelegatingAuthenticator
@NullMarked
@Internal
public abstract class AuthenticatorWrapper
extends Object
implements Authenticator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyTlsProperties(com.couchbase.client.core.deps.io.netty.handler.ssl.SslContextBuilder sslContextBuilder) The authenticator gets the chance to attach the client certificate to the ssl context if needed.voidauthHttpRequest(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.voidauthKeyValueConnection(EndpointContext endpointContext, com.couchbase.client.core.deps.io.netty.channel.ChannelPipeline pipeline) Allows the authenticator to add KV handlers during connection bootstrap to perform authentication.@Nullable StringReturns the value of the Authorization header to apply to HTTP requests, or null if no header should be applied.@Nullable SingleStepSaslAuthParametersReturns parameters for single-step SASL authentication refresh requests, or null if unsupported.booleanprotected abstract Authenticatorwrapped()
-
Constructor Details
-
AuthenticatorWrapper
public AuthenticatorWrapper()
-
-
Method Details
-
wrapped
-
authKeyValueConnection
public void authKeyValueConnection(EndpointContext endpointContext, com.couchbase.client.core.deps.io.netty.channel.ChannelPipeline pipeline) Description copied from interface:AuthenticatorAllows the authenticator to add KV handlers during connection bootstrap to perform authentication.- Specified by:
authKeyValueConnectionin interfaceAuthenticator- Parameters:
endpointContext- the endpoint context.pipeline- the pipeline when the endpoint is constructed.
-
authHttpRequest
public void authHttpRequest(ServiceType serviceType, com.couchbase.client.core.deps.io.netty.handler.codec.http.HttpRequest request) Description copied from interface:AuthenticatorAllows to add authentication credentials to the http request for the given service.- Specified by:
authHttpRequestin interfaceAuthenticator- Parameters:
serviceType- the service for this request.request- the http request.
-
getAuthHeaderValue
Description copied from interface:AuthenticatorReturns the value of the Authorization header to apply to HTTP requests, or null if no header should be applied.- Specified by:
getAuthHeaderValuein interfaceAuthenticator
-
applyTlsProperties
public void applyTlsProperties(com.couchbase.client.core.deps.io.netty.handler.ssl.SslContextBuilder sslContextBuilder) Description copied from interface:AuthenticatorThe authenticator gets the chance to attach the client certificate to the ssl context if needed.- Specified by:
applyTlsPropertiesin interfaceAuthenticator- Parameters:
sslContextBuilder- the netty context builder
-
requiresTls
public boolean requiresTls()- Specified by:
requiresTlsin interfaceAuthenticator
-
getSingleStepSaslAuthParameters
Description copied from interface:AuthenticatorReturns parameters for single-step SASL authentication refresh requests, or null if unsupported.- Specified by:
getSingleStepSaslAuthParametersin interfaceAuthenticator
-