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 commonAuthContextinterface for the JAAS environment.- See Also:
AuthContext
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedJAASAuthContext(String appName, CallbackHandler cbHandler, Subject subject)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SubjectgetSubject()Return the authenticated Subject.voidlogin()Perform the authentication and, if successful, associate Principals and Credentials with the authenticatedSubject.voidlogout()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 LoginExceptionDescription copied from interface:AuthContextPerform the authentication and, if successful, associate Principals and Credentials with the authenticatedSubject.- Specified by:
loginin interfaceAuthContext- Throws:
LoginException- if the authentication fails.- See Also:
LoginContext.login()
-
getSubject
public Subject getSubject()
Description copied from interface:AuthContextReturn the authenticated Subject.- Specified by:
getSubjectin interfaceAuthContext- Returns:
- the authenticated Subject or
nullif authentication failed. - See Also:
LoginContext.getSubject()
-
logout
public void logout() throws LoginExceptionDescription copied from interface:AuthContextLogout theSubject.- Specified by:
logoutin interfaceAuthContext- Throws:
LoginException- if the logout fails.- See Also:
LoginContext.logout()
-
-