aspose file tools*
The moose likes JDBC and the fly likes password encoding problem in acegi..is it mandatory? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "password encoding problem in acegi..is it mandatory?" Watch "password encoding problem in acegi..is it mandatory?" New topic
Author

password encoding problem in acegi..is it mandatory?

dee sri
Greenhorn

Joined: Mar 10, 2006
Posts: 5
I am trying to configure acegi security on top of a web- application in which the passwords are already entered manually in the MYSQL db.
Without using any passwordencoding also, the authentication fails , though correct password is entered.
also, is the enabled column mandatory in the authoritiesByUsernameQuery.

pl. see the following. i have commented teh passwordencoder and in the usersByUsernameQuery I have given enabled as true as there is no column called enabled in the db.Is this the right way to configure!

Pl. let me know why authentication is failing always!
also how to set up logging in case of acegi errors in tomcat?

part of applicationcontext-acegisecurity.xml
<!-- bean id="passwordEncoder" class="net.sf.acegisecurity.providers.encoding.Pla intextPasswordEncoder"/ -->

<bean id="daoAuthenticationProvider" class="net.sf.acegisecurity.providers.dao.DaoAuthe nticationProvider">
<property name="authenticationDao"><ref local="jdbcAuthenticationDao"/></property>
<!-- property name="userCache"><ref local="userCache"/></property -->
<!-- property name="passwordEncoder"><ref local="passwordEncoder"/></property -->
</bean>

<bean id="jdbcAuthenticationDao" class="net.sf.acegisecurity.providers.dao.jdbc.Jdb cDaoImpl">
<property name="dataSource"><ref bean="dataSource"/></property>
<property name="usersByUsernameQuery">
<value>SELECT ACCOUNTID,PASSWORD,enabled as 1 FROM account WHERE ACCOUNTID = ?</value>
</property>
<property name="authoritiesByUsernameQuery">
<value>SELECT ROLEID,ROLEDESC FROM ROLE WHERE ROLEID = ?</value>
</property>
</bean>
Maximilian Xavier Stocker
Ranch Hand

Joined: Sep 20, 2005
Posts: 381
I do not know the answer to your question but I rather suspect you will find the answer here http://acegisecurity.org/docbook/acegi.html
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: password encoding problem in acegi..is it mandatory?