Ben,
try this: In your Contacts example application I have done those changes in
applicationContext.xml:
1) changed the password of marrisa to be MD5 encrypted
2) added passwordEncoder bean
3) used this passwordEncoder in daoAuthenticationProvider
The whole part of changed config:
<bean id="inMemoryDaoImpl"
class="net.sf.acegisecurity.providers.dao.memory.InMemoryDaoImpl">
<property name="userMap">
<value>
marissa=a564de63c2d0da68cf47586ee05984d7,ROLE_TELLER,ROLE_SUPERVISOR
dianne=emu,ROLE_TELLER
scott=wombat,ROLE_TELLER
peter=opal,disabled,ROLE_TELLER
</value>
</property>
</bean>
<bean id="passwordEncoder"
class="net.sf.acegisecurity.providers.encoding.Md5PasswordEncoder"/>
<bean id="daoAuthenticationProvider"
class="net.sf.acegisecurity.providers.dao.DaoAuthenticationProvider">
<property name="authenticationDao"><ref
bean="inMemoryDaoImpl"/></property>
<property name="userCache"><ref bean="userCache"/></property>
<property name="passwordEncoder"><ref
bean="passwordEncoder"/></property>
</bean>
... and I cannot log in. I have tried to debug it and understand what's
going on but the process is too complicated for me.
Regards,
Karel
----- Original Message -----
From: "Ben Alex" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 07, 2004 11:55 PM
Subject: RE: [Acegisecurity-developer] DaoAuthenticationProvider doesn't
work with passwordEncoder in 0.51
> Hi Karel
>
> > 1) when passwordEncoder is used with
> > DaoAuthenticationProvider it is impossible to login. In the
> > first call into the PasswordEncoder it is OK, but on the
> > subsequent calls there are passed the encoded passwords into
> > both encPass and rawPass arguments, so it fails (=> it is OK
> > for plain passwords). It seems to work OK in the previous
> > 0.50 release. (I have created my own MysqlPasswordEncoder,
> > but this should not be the problem because it seems to be
> > fine with 0.50 release).
>
> Could you send me a unit test to demonstrate, or describe your
configuration
> some more (perhaps send the relevant applicationContext.xml fragments)?
The
> only major change between 0.5 and 0.51 was the UserCache. UserCache caches
> the password as it is provided by the AuthenticationDao, and does not
change
> it.
>
> > 2) in the documentation there is still used an example with
> > refreshTokenInterval attribute set to some millisecond value
> > of DaoAuthenticationProvider, but it produces an exception at
> > application startup
>
> Thanks for pointing this out. refreshTokenInterval has been removed from
> DaoAuthenticationProvider. You can safely remove it from your application
> context. I've updated the reference documentation and will commit it to
CVS
> soon.
>
> Best regards
> Ben
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: GNOME Foundation
> Hackers Unite! GUADEC: The world's #1 Open Source Desktop Event.
> GNOME Users and Developers European Conference, 28-30th June in Norway
> http://2004/guadec.org
> _______________________________________________
> Acegisecurity-developer mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer
>
>
-------------------------------------------------------
This SF.Net email is sponsored by: GNOME Foundation
Hackers Unite! GUADEC: The world's #1 Open Source Desktop Event.
GNOME Users and Developers European Conference, 28-30th June in Norway
http://2004/guadec.org
_______________________________________________
Acegisecurity-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer