2 Replies Latest reply on Nov 9, 2010 11:08 AM by ajanz

    token based rememberMe not working

    ajanz

      i try to implement the tokenbased rememberMe as described in section 15.3.5.1


      but no tokens are created. the table is still empty.


      i bound the checkbox to rememberMe.enabled and did everthing like described. but nothing happens.


      any ideas what might be wrong?


        • 1. Re: token based rememberMe not working
          ajanz
          here's my component.xml

          <?xml version="1.0" encoding="UTF-8"?>
          <components xmlns="http://jboss.com/products/seam/components"
                      xmlns:core="http://jboss.com/products/seam/core"
                      xmlns:persistence="http://jboss.com/products/seam/persistence"
                      xmlns:drools="http://jboss.com/products/seam/drools"
                      xmlns:bpm="http://jboss.com/products/seam/bpm"
                      xmlns:security="http://jboss.com/products/seam/security"
                      xmlns:mail="http://jboss.com/products/seam/mail"
                      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                      xmlns:web="http://jboss.com/products/seam/web"
                      xmlns:async="http://jboss.com/products/seam/async"
                      xsi:schemaLocation=
                          "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.0.xsd
                           http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.0.xsd
                           http://jboss.com/products/seam/drools http://jboss.com/products/seam/drools-2.0.xsd
                           http://jboss.com/products/seam/bpm http://jboss.com/products/seam/bpm-2.0.xsd
                           http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.0.xsd
                           http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-2.0.xsd
                           http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.0.xsd">
             <core:init debug="false"  transaction-management-enabled="false"   jndi-pattern="@jndiPattern@"/>
             <web:ajax4jsf-filter    force-parser="false" enable-cache="true"  url-pattern="*.seam"   />
             <!-- aus http://javaspecialist.wordpress.com/2010/05/30/performance-tuning-of-seam-jsf-richfaces-for-webapps/  Geht aber leider erst ab seam 2.1.2-->
             <web:cache-control-filter name="imageCacheControlFilter" regex-url-pattern=".*(\.gif|\.png|\.jpg|\.jpeg)" value="max-age=86400"/>
             <web:cache-control-filter name="textCacheControlFilter" regex-url-pattern=".*(\.css|\.js)" value="max-age=1400"/>
             <web:redirect-filter url-pattern="*.seam"/>
             <core:manager concurrent-request-timeout="65000"
                           conversation-timeout="120000"
                           conversation-id-parameter="cid"
                           parent-conversation-id-parameter="pid"/>
             <async:timer-service-dispatcher />
                 <persistence:managed-persistence-context name="entityManager" auto-create="true"
                          persistence-unit-jndi-name="java:/MyAppEntityManagerFactory"/>
             
            
             
                <security:identity authenticate-method="#{authenticator.authenticate}"    />
                <security:jpa-token-store token-class="de.lorenz.soaworkflow.core.authenticate.AuthenticationToken"/>
                <security:remember-me mode="autoLogin"/>
                 
             <component class="org.jboss.seam.web.MultipartFilter">
            <property name="createTempFiles">true</property>
            <property name="maxRequestSize">100000000</property>
          </component>
              <event type="org.jboss.seam.security.notLoggedIn">
                  <action execute="#{redirect.captureCurrentView}"/>
              </event>
             
              <event type="org.jboss.seam.security.loginSuccessful">
                  <action execute="#{redirect.returnToCapturedView}"/>
              </event>   

          </components>
          • 2. Re: token based rememberMe not working
            ajanz

            ok, after checking the jpa sample....and having a very close look at components.xml and persistence.xml  , i am just one step forward.


            now the token is stored. but never retrieved.


            i click rememberme, login, logout, and the fields userid and password remain empty. even the checkbox rememberme is not checked.