org.apache.jackrabbit.core.security
Class AuthContext

java.lang.Object
  extended byorg.apache.jackrabbit.core.security.AuthContext
Direct Known Subclasses:
AuthContext.JAAS, AuthContext.Local

public abstract class AuthContext
extends Object

An authentication context used to authenticate users. It is similar to JAAS' LoginContext but can work in a non-JAAS environment.

This class is abstract and has two implementations:


Nested Class Summary
static class AuthContext.JAAS
          An AuthContext implemented using a regular JAAS LoginContext.
static class AuthContext.Local
          An AuthContext implemented using a particular LoginModule.
 
Constructor Summary
AuthContext()
           
 
Method Summary
abstract  Subject getSubject()
          Return the authenticated Subject.
abstract  void login()
          Perform the authentication and, if successful, associate Principals and Credentials with the authenticatedSubject.
abstract  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

AuthContext

public AuthContext()
Method Detail

login

public abstract void login()
                    throws LoginException
Perform the authentication and, if successful, associate Principals and Credentials with the authenticatedSubject.

Throws:
LoginException - if the authentication fails.
See Also:
LoginContext.login()

getSubject

public abstract Subject getSubject()
Return the authenticated Subject.

Returns:
the authenticated Subject or null if authentication failed.
See Also:
LoginContext.getSubject()

logout

public abstract void logout()
                     throws LoginException
Logout the Subject.

Throws:
LoginException - if the logout fails.
See Also:
LoginContext.logout()


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