Interface Login
public interface Login
Login interface for authentication.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes this instance.void
configure
(Map<String, ?> configs, String contextName, Configuration jaasConfiguration, AuthenticateCallbackHandler loginCallbackHandler) Configures this login instance.login()
Performs login for each login module specified for the login context of this instance.Returns the service name to be used for SASL.subject()
Returns the authenticated subject of this login context.
-
Method Details
-
configure
void configure(Map<String, ?> configs, String contextName, Configuration jaasConfiguration, AuthenticateCallbackHandler loginCallbackHandler) Configures this login instance.- Parameters:
configs
- Key-value pairs containing the parsed configuration options of the client or broker. Note that these are the Kafka configuration options and not the JAAS configuration options. The JAAS options may be obtained from `jaasConfiguration`.contextName
- JAAS context name for this login which may be used to obtain the login context from `jaasConfiguration`.jaasConfiguration
- JAAS configuration containing the login context named `contextName`. If static JAAS configuration is used, this `Configuration` may also contain other login contexts.loginCallbackHandler
- Login callback handler instance to use for this Login. Login callback handler class may be configured usingSaslConfigs.SASL_LOGIN_CALLBACK_HANDLER_CLASS
.
-
login
Performs login for each login module specified for the login context of this instance.- Throws:
LoginException
-
subject
Subject subject()Returns the authenticated subject of this login context. -
serviceName
String serviceName()Returns the service name to be used for SASL. -
close
void close()Closes this instance.
-