1 Reply Latest reply on Jan 31, 2011 7:58 PM by kragoth

    Seam autentication

    mtigua.mtigua.yahoo.es
      Hello to everyone:

      I have the following configuration in pages.xml file. The parameters are sent by an html page and the first time the Authenticator.authenticate() method is called and the page busquedaBono.xhtml is shown. But when I press a button that redirect me to the html page a I enter new data the Authenticator.authenticate() method is not called. How could I do for the authenticate() method being call each time ?   


           <page view-id="/home.xhtml" >
              <action execute="#{identity.login}"/>
                <param name="user_rut" value="#{credentials.username}" />
                <param name="emp_rut" value="#{usuario.empRut}" />
                <param name="auth_level" value="#{usuario.authLevel}" />
                
              <navigation from-action="#{identity.login}" >
                      <rule if="#{identity.loggedIn}" >
                              <redirect view-id="/paginas/busquedaBono.xhtml" />
                      </rule>
                      <rule if="#{not identity.loggedIn}">
                              <redirect view-id="/errorLogin.xhtml"/>
                      </rule>
              </navigation>
          </page>

      ``

        • 1. Re: Seam autentication
          kragoth

          Once you are authenticated it doesn't matter that you enter different information your session has been authenticated and thus it does not try to do it again.


          If you want to authenticate using different credentials then you must make sure you use the appropriate logout method.


          I think it is identity.logout();


          Think if it just how Windows does not ask you to enter your username and password every time you try to open an application. Once you have logged in then you don't need to do so again until you log out.