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 protected
LocalAuthContext(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 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
-
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 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()
-
-