[jboss-user] [JBoss Seam] - authenticator.authenticate called several times

terryb do-not-reply at jboss.com
Tue Jan 22 00:29:19 EST 2008


Since upgrading to seam 2.0.0GA, my authenticator.authenticate is invoked several times rather than just once. There are no error. wondering if anyone else had similar problem or got any clues?



  | login.xhtml
  | 	    <h:form id="login" onsubmit="return validateForm(document.forms['login'])">
  |             <div class="dialogtable">
  |                 <rich:separator height="1"/>
  | 
  |                 <h:panelGrid columns="2" rowClasses="prop" columnClasses="name,value">
  | 
  |                     <h:outputLabel for="username">Username<span class="required">*</span></h:outputLabel>
  |                     <h:inputText id="username" value="#{identity.username}" required="true" requiredMessage="Username is requierd." size="20"></h:inputText>
  | 
  |                     <h:outputLabel for="password">Password<span class="required">*</span></h:outputLabel>
  |                     <h:inputSecret id="password" value="#{identity.password}" required="true"  requiredMessage="Password is requierd." size="20"></h:inputSecret>
  | 
  |                     <h:outputLabel for="rememberMe">Remember me</h:outputLabel>
  |                     <h:selectBooleanCheckbox id="rememberMe" value="#{identity.rememberMe}"/>
  | 
  |                 </h:panelGrid>
  |            </div>  
  |             <rich:separator height="1"/>
  |              <div class="actionButtons">
  |                 <h:commandButton styleClass="button" value="Login" action="#{identity.login}"/>
  |                 <s:button styleClass="button" value="Cancel" view="/home.xhtml"/>
  |              </div>
  | 	    </h:form>
  | 
  | 
  | --------------------------------------------------------------------
  | login.page.xml
  | <!DOCTYPE page PUBLIC
  |           "-//JBoss/Seam Pages Configuration DTD 2.0//EN"
  |           "http://jboss.com/products/seam/pages-2.0.dtd">
  |  
  | <page conversation-required="false">
  |    <navigation from-action="#{identity.login}">
  | 
  |       <rule if="#{not identity.loggedIn and orgUserAuthenticate.systemError}">
  |          <redirect view-id="/error.xhtml"/>
  |       </rule>
  | 
  |       <rule if="#{not identity.loggedIn and orgUserAuthenticate.accountSuspended}">
  |          <redirect view-id="/account-suspended.xhtml"/>
  |       </rule> 
  | 
  |       <rule if="#{not identity.loggedIn and orgUserAuthenticate.accountLocked}">
  |          <redirect view-id="/account-locked.xhtml"/>
  |       </rule>
  |             
  |       <rule if="#{identity.loggedIn}">
  |          <redirect view-id="/member/welcome.xhtml"/>
  |       </rule>
  |    </navigation>
  | </page>
  | 
  | --------------------------------------------------------------------
  | 
  | 
  | Authenticator.java
  | @Name("authenticator")
  | public class Authenticator {
  | 	@Logger
  | 	Log log;
  |  
  | 	@In
  | 	Identity identity;
  | 
  | 	@In(value = "orgUserAuthenticate", required = false, create = true)
  | 	private OrgUserAuthenticate orgUserAuthenticate;
  | 
  | 	@In(value = "orgUserAuthenticated", required = false)
  | 	private OrgUserAuthenticated orgUserAuthenticated;
  | 
  | 	@In(value = "activityLogger", required = false, create = true)
  | 	private ActivityLogger activityLog;
  | 
  | 	public boolean authenticate() {
  | 
  | 		log.info("INFO: authenticating #0", identity.getUsername());
  | 		return orgUserAuthenticate.authenticate();
  | 	}
  | 
  | 
  | 
  | 
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4122033#4122033

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4122033



More information about the jboss-user mailing list