public class JAASAuthContext extends Object implements AuthContext
AuthContext interface for the JAAS environment.AuthContext| Modifier | Constructor and Description | 
|---|---|
| protected  | JAASAuthContext(String appName,
               CallbackHandler cbHandler,
               Subject subject) | 
| 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 JAASAuthContext(String appName, CallbackHandler cbHandler, Subject subject)
appName - application name in JAAS Login-Configuration to usecbHandler - CallbackHandler for login-modulessubject - to extend authenticationpublic 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–2024 The Apache Software Foundation. All rights reserved.