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