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

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

public static class AuthContext.JAAS
extends AuthContext

An AuthContext implemented using a regular JAAS LoginContext.


Nested Class Summary
 
Nested classes inherited from class org.apache.jackrabbit.core.security.AuthContext
AuthContext.JAAS, AuthContext.Local
 
Constructor Summary
AuthContext.JAAS(String name, Credentials creds)
          Creates an authentication context given a JAAS configuration name 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.JAAS

public AuthContext.JAAS(String name,
                        Credentials creds)
                 throws LoginException
Creates an authentication context given a JAAS configuration name and some credentials.

Parameters:
name - the JAAS configuration index
creds - the credentials
Throws:
LoginException - if the JAAS context couldn't be created
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.