public class LoginContext extends Object implements LoginContext
doPrivileged()
on invoke()
method so that
Error and Runtime exceptions can be passed back to the caller. Otherwise
any exception is converted to LoginException
.Modifier and Type | Class and Description |
---|---|
static class |
LoginContext.ModuleInfo
LoginModule information -
encapsulates Configuration info and actual module instances.
|
Constructor and Description |
---|
LoginContext(AppConfigurationEntry[] entries,
CallbackHandler callbackHandler) |
LoginContext(AppConfigurationEntry[] entries,
Subject subject,
CallbackHandler callbackHandler) |
Modifier and Type | Method and Description |
---|---|
List<String> |
getModuleInstanceNames()
Returns module instance names list
|
LoginContext.ModuleInfo[] |
getModuleStack() |
LinkedList<LoginContext.ModuleInfo> |
getModuleStackQueue() |
LoginException |
getOptionalException() |
LoginException |
getRequiredException() |
Subject |
getSubject()
Return the authenticated Subject.
|
void |
login()
Perform the authentication.
|
void |
logout()
Logout the
Subject . |
void |
resetAuthChainToModule(int moduleIndex)
Resets auth chain to particular module, auth chain starts with this module
|
void |
setModuleStackQueue(LinkedList<LoginContext.ModuleInfo> moduleStackQueue) |
void |
setNextModule(int moduleIndex)
Sets next module by module index in chain, allows to modify auth chain during auth
|
void |
setNextModule(String moduleName)
Sets next module by module name, allows to modify auth chain during auth
|
public LoginContext(AppConfigurationEntry[] entries, CallbackHandler callbackHandler) throws LoginException
LoginException
public LoginContext(AppConfigurationEntry[] entries, Subject subject, CallbackHandler callbackHandler) throws LoginException
LoginException
public void login() throws LoginException
LoginContext
login
in interface LoginContext
LoginException
- if the authentication fails.public void logout() throws LoginException
LoginContext
Subject
.logout
in interface LoginContext
LoginException
- if the logout fails.public LoginContext.ModuleInfo[] getModuleStack()
public Subject getSubject()
LoginContext
getSubject
in interface LoginContext
public void setNextModule(String moduleName)
moduleName
- public void setNextModule(int moduleIndex)
moduleName
- public List<String> getModuleInstanceNames()
public void resetAuthChainToModule(int moduleIndex) throws ResetAuthChainException
moduleIndex
- index of moduleResetAuthChainException
public LoginException getRequiredException()
public LoginException getOptionalException()
public LinkedList<LoginContext.ModuleInfo> getModuleStackQueue()
public void setModuleStackQueue(LinkedList<LoginContext.ModuleInfo> moduleStackQueue)
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.