-
1. Re: Seam authentication module problem
javabr May 25, 2007 2:46 PM (in response to carlos.abreu)carlos,
list your components.xml, web.xml, login page and other code you think important here, please. -
2. Re: Seam authentication module problem
carlos.abreu May 25, 2007 2:55 PM (in response to carlos.abreu)Humm... Allright, my configuration files is:
login.page.xml<!DOCTYPE page PUBLIC "-//JBoss/Seam Pages Configuration DTD 1.1//EN" "http://jboss.com/products/seam/pages-1.1.dtd"> <page> <navigation from-action="#{identity.login}"> <rule if="#{identity.loggedIn}"> <redirect view-id="/home.xhtml"/> </rule> </navigation> </page>
components.xml<drools:rule-base name="securityRules"> <drools:rule-files><value>/security.drl</value></drools:rule-files> </drools:rule-base> <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:<h:form> <div class="dialog"> <div class="prop"> <span class="name">Username</span> <span class="value"> <h:inputText id="username" value="#{identity.username}"/> </span> </div> <div class="prop"> <span class="name">Password</span> <span class="value"> <h:inputSecret id="password" value="#{identity.password}"/> </span> </div> </div> <div class="actionButtons"> <h:commandButton value="Login" action="#{identity.login}"/> </div> </h:form>
Thanks. -
3. Re: Seam authentication module problem
shane.bryzak May 25, 2007 8:03 PM (in response to carlos.abreu)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 May 28, 2007 10:28 AM (in response to carlos.abreu)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
Thanks... -
5. Re: Seam authentication module problem
carlos.abreu May 30, 2007 9:29 AM (in response to carlos.abreu)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.
Thanks