public class LocalAuthContext extends Object implements AuthContext
LoginContextAuthContext| Modifier | Constructor and Description | 
|---|---|
protected  | 
LocalAuthContext(LoginModuleConfig config,
                CallbackHandler cbHandler,
                Subject subject)
Create Context and set Subject to extend its authentication 
 | 
| Modifier and Type | Method and Description | 
|---|---|
Subject | 
getSubject()
Return the authenticated Subject. 
 | 
void | 
login()
Perform the authentication and, if successful, associate Principals and Credentials
 with the authenticated 
Subject. | 
void | 
logout()
Logout the  
Subject. | 
protected LocalAuthContext(LoginModuleConfig config, CallbackHandler cbHandler, Subject subject)
config - Configuration to be used for the LoginModulecbHandler - CallbackHandler for the LoginModulesubject - Subject if a pre-authenticated existspublic void login()
           throws LoginException
AuthContextSubject.login in interface AuthContextLoginException - if the authentication fails.LoginContext.login()public Subject getSubject()
AuthContextgetSubject in interface AuthContextnull if authentication failed.LoginContext.getSubject()public void logout()
            throws LoginException
AuthContextSubject.logout in interface AuthContextLoginException - if the logout fails.LoginContext.logout()Copyright © 2004–2020 The Apache Software Foundation. All rights reserved.