Class LocalAuthContext
- java.lang.Object
-
- org.apache.jackrabbit.core.security.authentication.LocalAuthContext
-
- All Implemented Interfaces:
AuthContext
public class LocalAuthContext extends Object implements AuthContext
Provide AuthContext interface, for a JAAS-LoginModule not running in aLoginContext- See Also:
AuthContext
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedLocalAuthContext(LoginModuleConfig config, CallbackHandler cbHandler, Subject subject)Create Context and set Subject to extend its authentication
-
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
-
LocalAuthContext
protected LocalAuthContext(LoginModuleConfig config, CallbackHandler cbHandler, Subject subject)
Create Context and set Subject to extend its authentication- Parameters:
config- Configuration to be used for the LoginModulecbHandler- CallbackHandler for the LoginModulesubject- Subject if a pre-authenticated exists
-
-
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()
-
-