org.apache.jackrabbit.core.security.authentication
Class LocalAuthContext

java.lang.Object
  extended by 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 a LoginContext

See Also:
AuthContext

Constructor Summary
protected LocalAuthContext(LoginModuleConfig config, CallbackHandler cbHandler, Subject subject)
          Create Context and set Subject to extend its authentication
 
Method Summary
 Subject getSubject()
          Return the authenticated Subject.
 void login()
          Perform the authentication and, if successful, associate Principals and Credentials with the authenticatedSubject.
 void logout()
          Logout the Subject.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalAuthContext

protected LocalAuthContext(LoginModuleConfig config,
                           CallbackHandler cbHandler,
                           Subject subject)
Create Context and set Subject to extend its authentication

Parameters:
config - Condiguration to be used for the LoginModule
cbHandler - CallbackHandler for the LoginModule
subject - 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 interface AuthContext
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 interface AuthContext
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 the Subject.

Specified by:
logout in interface AuthContext
Throws:
LoginException - if the logout fails.
See Also:
LoginContext.logout()


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.