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

java.lang.Object
  extended by org.apache.jackrabbit.core.security.authentication.JAASAuthContext
All Implemented Interfaces:
AuthContext

public class JAASAuthContext
extends Object
implements AuthContext

Implements the common AuthContext interface for the JAAS environment.

See Also:
AuthContext

Constructor Summary
protected JAASAuthContext(String appName, CallbackHandler cbHandler, Subject subject)
           
 
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

JAASAuthContext

protected JAASAuthContext(String appName,
                          CallbackHandler cbHandler,
                          Subject subject)
Parameters:
appName - application name in JAAS Login-Configuration to use
cbHandler - CallbackHandler for login-modules
subject - 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 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.