站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBOSS Portal 2.2 API 英文版文档

CacheLoginModule - JBOSS Portal 2.2 API 英文版文档


org.jboss.portal.core.security.jaas
Class CacheLoginModule

java.lang.Object
  extended byorg.jboss.portal.core.security.jaas.CacheLoginModule
All Implemented Interfaces:
javax.security.auth.spi.LoginModule

public class CacheLoginModule
extends java.lang.Object
implements javax.security.auth.spi.LoginModule

This login module takes the incoming hash and fetch login/password from its cache and put it in the shared map. All the other module after this one must be configured to use userFirstPass in the password-stacking option.


Nested Class Summary
static class CacheLoginModule.Handle
          Handle returned to the client.
 
Constructor Summary
CacheLoginModule()
           
 
Method Summary
 boolean abort()
           
static CacheLoginModule.Handle cache(java.lang.String key, java.lang.String userName, java.lang.String password)
          Cache a user name and password under the specified key.
 boolean commit()
           
 void initialize(javax.security.auth.Subject subject, javax.security.auth.callback.CallbackHandler callbackHandler, java.util.Map sharedState, java.util.Map options)
           
 boolean login()
           
 boolean logout()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheLoginModule

public CacheLoginModule()
Method Detail

cache

public static CacheLoginModule.Handle cache(java.lang.String key,
                                            java.lang.String userName,
                                            java.lang.String password)
Cache a user name and password under the specified key. This handle is used as the real key in the cache. That means that it will stay here until there is a weak reference on that handle or the login() method is called on this login module. It is used by the LoginServlet and put in the HTTP session, so it will stay in the cache at least until this session expires.


initialize

public void initialize(javax.security.auth.Subject subject,
                       javax.security.auth.callback.CallbackHandler callbackHandler,
                       java.util.Map sharedState,
                       java.util.Map options)
Specified by:
initialize in interface javax.security.auth.spi.LoginModule

login

public boolean login()
              throws javax.security.auth.login.LoginException
Specified by:
login in interface javax.security.auth.spi.LoginModule
Throws:
javax.security.auth.login.LoginException

commit

public boolean commit()
               throws javax.security.auth.login.LoginException
Specified by:
commit in interface javax.security.auth.spi.LoginModule
Throws:
javax.security.auth.login.LoginException

abort

public boolean abort()
              throws javax.security.auth.login.LoginException
Specified by:
abort in interface javax.security.auth.spi.LoginModule
Throws:
javax.security.auth.login.LoginException

logout

public boolean logout()
               throws javax.security.auth.login.LoginException
Specified by:
logout in interface javax.security.auth.spi.LoginModule
Throws:
javax.security.auth.login.LoginException