Identity Authentication problem
ceduardo.roque Aug 28, 2008 11:50 PMHi fellows,
I'm trying to code my first identity authentication control and I'm having an error that must be usual to you. The error shown on JBoss Log is:
= No authentication method defined - please define authenticate-method for <security:identity/> in components.xml =
I've read the post below and did exactly as our friend Kenneth told, and it still doesn't work.
http://www.seamframework.org/Community/SeamLoginModuleNoAuthenticationMethodDefined
My EAR file is composed by an EJBJAR file and an EJBWAR file. The EAR File is composed like it's shown below:
EAR file
/lib
jboss-el.jar
/META-INF
application.xml
MANIFEST.MF
jboss-seam.jar
EJBJAR.jar
<packages>+<classes>
META-INF
ejb-jar.xml
MANIFEST.MF
components.properties
seam.properties
APPWAR.war
META-INF
MANIFEST.MF
WEB-INF
/classes
<nothing>
/lib
axis.jar
commons-beanutils.jar
commons-digester.jar
commons-discovery-0.2.jar
commons-logging.jar
el-ri.jar
jaxrpc.jar
jboss-seam.jar
jsf-facelets.jar
richfaces-api-3.2.1.GA.jar
richfaces-impl-3.2.1.GA.jar
richfaces-ui-3.2.1.GA.jar
saaj.jar
wsdl4j-1.5.1.jar
components.xml
faces-config.xml
pages.xml
web.xml
My components.xml file is listed below:
`<core:init debug="true" jndi-pattern="@jndiPattern@"/>
<core:manager conversation-timeout="120000"
concurrent-request-timeout="500"
conversation-id-parameter="cid"/>
<transaction:ejb-transaction/>
<security:identity authenticate-method="#{Autenticador.autenticar}" remember-me="true"/>`
My class that authenticates de user is here:
`
@Stateless
@Name("Autenticador")
public class AutenticadorBean implements Autenticador {
@In
private Identity identity;
public boolean autenticar() {
return true;
}
}
And the page form is here:
| <h:form id="Form">
<br/>
<br/>
<br/>
<br/>
<br/>
<h:panelGrid columns="4">
<h:outputText style="font: Verdana; font-size: 14px; font-weight: bold; color: #000000;" value="* Hierarquia:" /><h:inputText style="width: 150px"/><h:inputText style="width: 300px"/><h:commandButton value="..."/>
<h:outputText style="font: Verdana; font-size: 14px; font-weight: bold; color: #000000;" value=" * Usuário:" /><h:inputText value="#{identity.username}" style="width: 150px"/><h:inputText style="width: 300px"/><h:outputText value=""/>
<h:outputText style="font: Verdana; font-size: 14px; font-weight: bold; color: #000000;" value=" * Senha:" /><h:inputText value="#{identity.password}" style="width: 150px"/>
</h:panelGrid>
<h:panelGrid columns="2">
<h:commandButton value="OK" action="#{identity.login}"/>
<h:commandButton value="Cancelar"/>
</h:panelGrid>
</h:form>|
Is anybody seeing something that I'm not?
I hope somebody can help.
Thank you in advance.
I'm trying to code my first identity authentication control and I'm having an error that must be usual to you. The error shown on JBoss Log is:
= No authentication method defined - please define authenticate-method for <security:identity/> in components.xml =
I've read the post below and did exactly as our friend Kenneth told, and it still doesn't work.
http://www.seamframework.org/Community/SeamLoginModuleNoAuthenticationMethodDefined
My EAR file is composed by an EJBJAR file and an EJBWAR file. The EAR File is composed like it's shown below:
EAR file
/lib
jboss-el.jar
/META-INF
application.xml
MANIFEST.MF
jboss-seam.jar
EJBJAR.jar
<packages>+<classes>
META-INF
ejb-jar.xml
MANIFEST.MF
components.properties
seam.properties
APPWAR.war
META-INF
MANIFEST.MF
WEB-INF
/classes
<nothing>
/lib
axis.jar
commons-beanutils.jar
commons-digester.jar
commons-discovery-0.2.jar
commons-logging.jar
el-ri.jar
jaxrpc.jar
jboss-seam.jar
jsf-facelets.jar
richfaces-api-3.2.1.GA.jar
richfaces-impl-3.2.1.GA.jar
richfaces-ui-3.2.1.GA.jar
saaj.jar
wsdl4j-1.5.1.jar
components.xml
faces-config.xml
pages.xml
web.xml
My components.xml file is listed below:
`<core:init debug="true" jndi-pattern="@jndiPattern@"/>
<core:manager conversation-timeout="120000"
concurrent-request-timeout="500"
conversation-id-parameter="cid"/>
<transaction:ejb-transaction/>
<security:identity authenticate-method="#{Autenticador.autenticar}" remember-me="true"/>`
My class that authenticates de user is here:
`
@Stateless
@Name("Autenticador")
public class AutenticadorBean implements Autenticador {
@In
private Identity identity;
public boolean autenticar() {
return true;
}
}
And the page form is here:
| <h:form id="Form">
<br/>
<br/>
<br/>
<br/>
<br/>
<h:panelGrid columns="4">
<h:outputText style="font: Verdana; font-size: 14px; font-weight: bold; color: #000000;" value="* Hierarquia:" /><h:inputText style="width: 150px"/><h:inputText style="width: 300px"/><h:commandButton value="..."/>
<h:outputText style="font: Verdana; font-size: 14px; font-weight: bold; color: #000000;" value=" * Usuário:" /><h:inputText value="#{identity.username}" style="width: 150px"/><h:inputText style="width: 300px"/><h:outputText value=""/>
<h:outputText style="font: Verdana; font-size: 14px; font-weight: bold; color: #000000;" value=" * Senha:" /><h:inputText value="#{identity.password}" style="width: 150px"/>
</h:panelGrid>
<h:panelGrid columns="2">
<h:commandButton value="OK" action="#{identity.login}"/>
<h:commandButton value="Cancelar"/>
</h:panelGrid>
</h:form>|
Is anybody seeing something that I'm not?
I hope somebody can help.
Thank you in advance.