Class JAASAuthContext
- java.lang.Object
-
- org.apache.jackrabbit.core.security.authentication.JAASAuthContext
-
- All Implemented Interfaces:
AuthContext
public class JAASAuthContext extends Object implements AuthContext
Implements the commonAuthContext
interface for the JAAS environment.- See Also:
AuthContext
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
JAASAuthContext(String appName, CallbackHandler cbHandler, Subject subject)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Subject
getSubject()
Return the authenticated Subject.void
login()
Perform the authentication and, if successful, associate Principals and Credentials with the authenticatedSubject
.void
logout()
Logout theSubject
.
-
-
-
Constructor Detail
-
JAASAuthContext
protected JAASAuthContext(String appName, CallbackHandler cbHandler, Subject subject)
- Parameters:
appName
- application name in JAAS Login-Configuration to usecbHandler
- CallbackHandler for login-modulessubject
- to extend authentication
-
-
Method Detail
-
login
public void login() throws LoginException
Description copied from interface:AuthContext
Perform the authentication and, if successful, associate Principals and Credentials with the authenticatedSubject
.- Specified by:
login
in interfaceAuthContext
- Throws:
LoginException
- if the authentication fails.- See Also:
LoginContext.login()
-
getSubject
public Subject getSubject()
Description copied from interface:AuthContext
Return the authenticated Subject.- Specified by:
getSubject
in interfaceAuthContext
- Returns:
- the authenticated Subject or
null
if authentication failed. - See Also:
LoginContext.getSubject()
-
logout
public void logout() throws LoginException
Description copied from interface:AuthContext
Logout theSubject
.- Specified by:
logout
in interfaceAuthContext
- Throws:
LoginException
- if the logout fails.- See Also:
LoginContext.logout()
-
-