Interface Login
-
public interface Login
Login interface for authentication.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method 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.
-
-
-
Method Detail
-
configure
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.- 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
javax.security.auth.login.LoginContext login() throws javax.security.auth.login.LoginException
Performs login for each login module specified for the login context of this instance.- Throws:
javax.security.auth.login.LoginException
-
subject
javax.security.auth.Subject subject()
Returns the authenticated subject of this login context.
-
serviceName
java.lang.String serviceName()
Returns the service name to be used for SASL.
-
close
void close()
Closes this instance.
-
-