5 Replies Latest reply on May 30, 2007 9:29 AM by Carlos Abreu

    Seam authentication module problem

    Carlos Abreu Newbie

      Hy i´m facing some problems when i try to set my Authentication module.

      1) I can´t execute the autentication method without setting the parameters value, like folows:

      public boolean authenticate(String username, String password, Set<String> roles)

      2) The Identity Class from the Seam Framework is returning null when i try to obtain the user password


      3) The Identity Class from the Seam Framework doesn´t have the addRole method:


      I am reading the seam tutorial about security modules(http://docs.jboss.com/seam/latest/reference/en/html/security.html#d0e6331).

      Can anyone know what is happening ?

      Thanks in advance

        • 1. Re: Seam authentication module problem
          Leo Newbie


          list your components.xml, web.xml, login page and other code you think important here, please.

          • 2. Re: Seam authentication module problem
            Carlos Abreu Newbie

            Humm... Allright, my configuration files is:


            <!DOCTYPE page PUBLIC
             "-//JBoss/Seam Pages Configuration DTD 1.1//EN"
             <navigation from-action="#{identity.login}">
             <rule if="#{identity.loggedIn}">
             <redirect view-id="/home.xhtml"/>

             <drools:rule-base name="securityRules">
             <security:identity authenticate-method="#{authenticator.authenticate}" />

            All the others configurations is using the default generated by seam gen.

            My login page is using this code:

             <div class="dialog">
             <div class="prop">
             <span class="name">Username</span>
             <span class="value">
             <h:inputText id="username" value="#{identity.username}"/>
             <div class="prop">
             <span class="name">Password</span>
             <span class="value">
             <h:inputSecret id="password" value="#{identity.password}"/>
             <div class="actionButtons">
             <h:commandButton value="Login" action="#{identity.login}"/>


            • 3. Re: Seam authentication module problem
              Shane Bryzak Master

              Your authenticate method has the wrong signature. It should accept no parameters, and instead refer to the username and password in Identity.

              • 4. Re: Seam authentication module problem
                Carlos Abreu Newbie

                Hy Shane, yes that is correct my authenticate method only work passing the parameters... If i let without it, i can´t recover the user password using the Identity.instance().getPassword(), always returns null.

                My other doubt is about the addRole method, this method doesn´t exist in the class org.jboss.seam.security.Identity


                • 5. Re: Seam authentication module problem
                  Carlos Abreu Newbie

                  I found the problem, the SEAM integration with JAAS only works with SEAM 1.2.

                  I sugest to inform what is the version of SEAM the example will work on the http://docs.jboss.com/seam/latest/reference/en/html/security.html page.