public interface Login
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this instance.
|
void |
configure(Map<String,?> configs,
String contextName,
Configuration jaasConfiguration,
AuthenticateCallbackHandler loginCallbackHandler)
Configures this login instance.
|
LoginContext |
login()
Performs login for each login module specified for the login context of this instance.
|
default void |
relogin() |
String |
serviceName()
Returns the service name to be used for SASL.
|
Subject |
subject()
Returns the authenticated subject of this login context.
|
void configure(Map<String,?> configs, String contextName, Configuration jaasConfiguration, AuthenticateCallbackHandler loginCallbackHandler)
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 using
SaslConfigs.SASL_LOGIN_CALLBACK_HANDLER_CLASS
.LoginContext login() throws LoginException
LoginException
default void relogin() throws LoginException
LoginException
Subject subject()
String serviceName()
void close()