org.apache.jackrabbit.core.security.authentication
Interface AuthContext

All Known Implementing Classes:
JAASAuthContext, LocalAuthContext

public interface AuthContext

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:


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.
 

Method Detail

login

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

Subject getSubject()
Return the authenticated Subject.

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

logout

void logout()
            throws LoginException
Logout the Subject.

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


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