Package com.couchbase.client.core.env
Class JwtAuthenticator
java.lang.Object
com.couchbase.client.core.env.JwtAuthenticator
- All Implemented Interfaces:
Authenticator
@SinceCouchbase("8.1")
@NullMarked
public class JwtAuthenticator
extends Object
implements Authenticator
Authenticates with the Couchbase Server cluster using a JSON Web Token (JWT)
issued by an Identity Provider.
Create a new instance by calling create(String).
-
Method Summary
Modifier and TypeMethodDescriptionvoidauthKeyValueConnection(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 JwtAuthenticatorReturns the value of the Authorization header to apply to HTTP requests, or null if no header should be applied.Returns parameters for single-step SASL authentication refresh requests, or null if unsupported.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.couchbase.client.core.env.Authenticator
applyTlsProperties, authHttpRequest, requiresTls
-
Method Details
-
create
-
authKeyValueConnection
public void authKeyValueConnection(EndpointContext ctx, 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:
ctx- the endpoint context.pipeline- the pipeline when the endpoint is constructed.
-
getSingleStepSaslAuthParameters
Description copied from interface:AuthenticatorReturns parameters for single-step SASL authentication refresh requests, or null if unsupported.- Specified by:
getSingleStepSaslAuthParametersin interfaceAuthenticator
-
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
-
toString
-