com.arsdigita.kernel.security
Class AdminLoginModule

java.lang.Object
  extended bycom.arsdigita.kernel.security.AdminLoginModule
All Implemented Interfaces:
javax.security.auth.spi.LoginModule

public class AdminLoginModule
extends Object
implements javax.security.auth.spi.LoginModule

Supports login as an aribtrary user by checking whether a user ID has been set for the Subject. If so, login succeeds, so commit is called on all login modules to log the user in. If no user ID is set, login fails. This module should appear at the beginning of a login context with the "sufficient" control flag. Note that this module does not check the privileges of the current user; this must be done by the code that runs the login context.

Author:
Sameer Ajmani
See Also:
UserContext.login(com.arsdigita.kernel.User)

Field Summary
static String versionId
           
 
Constructor Summary
AdminLoginModule()
           
 
Method Summary
 boolean abort()
          Trivial implementation; does nothing.
 boolean commit()
          Trivial implementation; does nothing.
 void initialize(javax.security.auth.Subject subject, javax.security.auth.callback.CallbackHandler handler, Map shared, Map options)
           
 boolean login()
          Checks whether a user ID has been assigned to the Subject.
 boolean logout()
          Trivial implementation; does nothing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

versionId

public static final String versionId
See Also:
Constant Field Values
Constructor Detail

AdminLoginModule

public AdminLoginModule()
Method Detail

initialize

public void initialize(javax.security.auth.Subject subject,
                       javax.security.auth.callback.CallbackHandler handler,
                       Map shared,
                       Map options)
Specified by:
initialize in interface javax.security.auth.spi.LoginModule

login

public boolean login()
              throws javax.security.auth.login.LoginException
Checks whether a user ID has been assigned to the Subject.

Specified by:
login in interface javax.security.auth.spi.LoginModule
Returns:
true.
Throws:
javax.security.auth.login.FailedLoginException - if no user ID has been assigned.
javax.security.auth.login.LoginException

commit

public boolean commit()
               throws javax.security.auth.login.LoginException
Trivial implementation; does nothing.

Specified by:
commit in interface javax.security.auth.spi.LoginModule
Returns:
true.
Throws:
javax.security.auth.login.LoginException

abort

public boolean abort()
              throws javax.security.auth.login.LoginException
Trivial implementation; does nothing.

Specified by:
abort in interface javax.security.auth.spi.LoginModule
Returns:
true.
Throws:
javax.security.auth.login.LoginException

logout

public boolean logout()
               throws javax.security.auth.login.LoginException
Trivial implementation; does nothing.

Specified by:
logout in interface javax.security.auth.spi.LoginModule
Returns:
true.
Throws:
javax.security.auth.login.LoginException


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 20 2004:2337 UTC