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
AuthContext
Subject
.login
in interface AuthContext
LoginException
- if the authentication fails.LoginContext.login()
public Subject getSubject()
AuthContext
getSubject
in interface AuthContext
null
if authentication failed.LoginContext.getSubject()
public void logout() throws LoginException
AuthContext
Subject
.logout
in interface AuthContext
LoginException
- if the logout fails.LoginContext.logout()
Copyright © 2004–2024 The Apache Software Foundation. All rights reserved.