Class AuthenticationConfigurationBuilder
java.lang.Object
org.infinispan.client.hotrod.configuration.AbstractConfigurationChildBuilder
org.infinispan.client.hotrod.configuration.AbstractSecurityConfigurationChildBuilder
org.infinispan.client.hotrod.configuration.AuthenticationConfigurationBuilder
- All Implemented Interfaces:
ConfigurationChildBuilder
,Builder<AuthenticationConfiguration>
public class AuthenticationConfigurationBuilder
extends AbstractSecurityConfigurationChildBuilder
implements Builder<AuthenticationConfiguration>
AuthenticationConfigurationBuilder.
- Since:
- 7.0
- Author:
- Tristan Tarrant
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncallbackHandler
(CallbackHandler callbackHandler) Specifies aCallbackHandler
to be used during the authentication handshake.clientSubject
(Subject clientSubject) Sets the client subject, necessary for those SASL mechanisms which require it to access client credentials (i.e.create()
Create the configuration beandisable()
Disables authenticationenable()
Enables authenticationenabled
(boolean enabled) Configures whether authentication should be enabled or notpassword
(char[] password) Specifies the password to be used for authentication.Specifies the password to be used for authentication.Builder
<?> read
(AuthenticationConfiguration template, Combine combine) Reads the configuration from an already created configuration bean into this builder.Specifies the realm to be used for authentication.saslMechanism
(String saslMechanism) Selects the SASL mechanism to use for the connection to the server.saslProperties
(Map<String, String> saslProperties) Sets the SASL properties.Sets the SASL QOP property.saslStrength
(SaslStrength... strength) Sets the SASL strength property.serverName
(String serverName) Sets the name of the server as expected by the SASL protocol Setting this property also implicitly enables authentication (seeenable()
This defaults toDEFAULT_SERVER_NAME
.Specifies the username to be used for authentication.void
validate()
Validate the data in this builder before building the configuration beanwithProperties
(Properties properties) Configures this builder using the specified properties.Methods inherited from class org.infinispan.client.hotrod.configuration.AbstractSecurityConfigurationChildBuilder
authentication, ssl
Methods inherited from class org.infinispan.client.hotrod.configuration.AbstractConfigurationChildBuilder
addCluster, addContextInitializer, addContextInitializer, addContextInitializers, addJavaSerialAllowList, addJavaSerialWhiteList, addServer, addServers, asyncExecutorFactory, balancingStrategy, balancingStrategy, balancingStrategy, batchSize, build, classLoader, clientIntelligence, connectionPool, connectionTimeout, consistentHashImpl, consistentHashImpl, dnsResolverMaxTTL, dnsResolverMinTTL, dnsResolverNegativeTTL, forceReturnValues, keySizeEstimate, marshaller, marshaller, marshaller, maxRetries, protocolVersion, remoteCache, security, socketTimeout, statistics, tcpKeepAlive, tcpNoDelay, transaction, transactionTimeout, transportFactory, uri, uri, valueSizeEstimate, version
-
Field Details
-
DEFAULT_REALM
- See Also:
-
DEFAULT_SERVER_NAME
- See Also:
-
DEFAULT_MECHANISM
- See Also:
-
-
Constructor Details
-
AuthenticationConfigurationBuilder
-
-
Method Details
-
attributes
- Specified by:
attributes
in interfaceBuilder<AuthenticationConfiguration>
-
callbackHandler
Specifies aCallbackHandler
to be used during the authentication handshake. TheCallback
s that need to be handled are specific to the chosen SASL mechanism. -
enabled
Configures whether authentication should be enabled or not -
enable
Enables authentication -
disable
Disables authentication -
saslMechanism
Selects the SASL mechanism to use for the connection to the server. Setting this property also implicitly enables authentication (seeenable()
-
saslProperties
Sets the SASL properties. Setting this property also implicitly enables authentication (seeenable()
-
saslQop
Sets the SASL QOP property. If multiple values are specified they will determine preference order. Setting this property also implicitly enables authentication (seeenable()
-
saslStrength
Sets the SASL strength property. If multiple values are specified they will determine preference order. Setting this property also implicitly enables authentication (seeenable()
-
serverName
Sets the name of the server as expected by the SASL protocol Setting this property also implicitly enables authentication (seeenable()
This defaults toDEFAULT_SERVER_NAME
. -
clientSubject
Sets the client subject, necessary for those SASL mechanisms which require it to access client credentials (i.e. GSSAPI). Setting this property also implicitly enables authentication (seeenable()
-
username
Specifies the username to be used for authentication. This will use a simple CallbackHandler. This is mutually exclusive with explicitly providing the CallbackHandler. Setting this property also implicitly enables authentication (seeenable()
-
password
Specifies the password to be used for authentication. A username is also required. Setting this property also implicitly enables authentication (seeenable()
-
password
Specifies the password to be used for authentication. A username is also required. Setting this property also implicitly enables authentication (seeenable()
-
realm
Specifies the realm to be used for authentication. Username and password also need to be supplied. If none is specified, this defaults toDEFAULT_REALM
. Setting this property also implicitly enables authentication (seeenable()
-
token
-
create
Description copied from interface:Builder
Create the configuration bean- Specified by:
create
in interfaceBuilder<AuthenticationConfiguration>
- Returns:
-
read
Description copied from interface:Builder
Reads the configuration from an already created configuration bean into this builder. Returns an appropriate builder to allow fluent configuration- Specified by:
read
in interfaceBuilder<AuthenticationConfiguration>
- Parameters:
template
- the configuration from which to "clone" this config if needed.combine
- the way attributes and children of this instance and the template should be combined.
-
validate
public void validate()Description copied from interface:Builder
Validate the data in this builder before building the configuration bean- Specified by:
validate
in interfaceBuilder<AuthenticationConfiguration>
-
withProperties
Description copied from interface:ConfigurationChildBuilder
Configures this builder using the specified properties. SeeConfigurationBuilder
for a list.- Specified by:
withProperties
in interfaceConfigurationChildBuilder
- Overrides:
withProperties
in classAbstractConfigurationChildBuilder
-