public class Login extends Object
Modifier and Type | Field and Description |
---|---|
static String |
MIN_TIME_BEFORE_RELOGIN_CONFIG_KEY |
static String |
SYSTEM_USER |
Constructor and Description |
---|
Login(String loginContextName,
Supplier<CallbackHandler> callbackHandlerSupplier,
ZKConfig zkConfig)
LoginThread constructor.
|
Modifier and Type | Method and Description |
---|---|
long |
getLastLogin()
Get the time of the last login (ticket initialization or last ticket renewal).
|
String |
getLoginContextName() |
Subject |
getSubject() |
String |
getUserName() |
protected void |
logout() |
CallbackHandler |
newCallbackHandler()
Return a new CallbackHandler for connections
to avoid race conditions and state sharing in
connection login processing.
|
void |
shutdown() |
protected void |
sleepBeforeRetryFailedRefresh() |
void |
startThreadIfNeeded() |
public static final String SYSTEM_USER
public static final String MIN_TIME_BEFORE_RELOGIN_CONFIG_KEY
public Login(String loginContextName, Supplier<CallbackHandler> callbackHandlerSupplier, ZKConfig zkConfig) throws LoginException
loginContextName
- name of section in JAAS file that will be use to login. Passed
as first param to javax.security.auth.login.LoginContext().callbackHandlerSupplier
- Per connection callbackhandler supplier.zkConfig
- client or server configurationsLoginException
- Thrown if authentication fails.public CallbackHandler newCallbackHandler()
public void startThreadIfNeeded()
public void shutdown()
public Subject getSubject()
public String getUserName()
public String getLoginContextName()
public long getLastLogin()
protected void logout() throws LoginException
LoginException
protected void sleepBeforeRetryFailedRefresh() throws InterruptedException
InterruptedException
Copyright © 2008–2025 The Apache Software Foundation. All rights reserved.