org.apache.jackrabbit.core.security
Class AuthContext.Local

java.lang.Object
  extended byorg.apache.jackrabbit.core.security.AuthContext
      extended byorg.apache.jackrabbit.core.security.AuthContext.Local
Enclosing class:
AuthContext

public static class AuthContext.Local
extends AuthContext

An AuthContext implemented using a particular LoginModule.


Nested Class Summary
 
Nested classes inherited from class org.apache.jackrabbit.core.security.AuthContext
AuthContext.JAAS, AuthContext.Local
 
Constructor Summary
AuthContext.Local(LoginModule module, Map options, Credentials creds)
          Creates an authentication context given a login module and some credentials.
 
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

AuthContext.Local

public AuthContext.Local(LoginModule module,
                         Map options,
                         Credentials creds)
Creates an authentication context given a login module and some credentials.

Parameters:
module - the login module
options - login module options
creds - the credentials
Method Detail

login

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

Specified by:
login in class AuthContext
Throws:
LoginException - if the authentication fails.
See Also:
LoginContext.login()

getSubject

public Subject getSubject()
Return the authenticated Subject.

Specified by:
getSubject in class AuthContext
Returns:
the authenticated Subject or null if authentication failed.
See Also:
LoginContext.getSubject()

logout

public void logout()
            throws LoginException
Logout the Subject.

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


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