Correct me if I'm wrong Ben, to be able to retrieve
UsernameNotFoundException from the event, I'll have to set
DaoAuthenticationProvider.hideUserNotFoundExceptions to false (by default
it's true).

I've set that, and now that the UsernameNotFoundException is thrown, but
ProviderManager can't generate an event for it, throwing:

A valid event must be available for the exception
net.sf.acegisecurity.providers.dao.UsernameNotFoundException 

Seems like the exceptionMappings does not contain UsernameNotFoundException.


Cheers.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Ben Alex
Sent: 05 November 2005 14:42
To: acegisecurity-developer@lists.sourceforge.net
Subject: Re: [Acegisecurity-developer] AuthenticationFailurePasswordEvent -
now it's gone, new issue props up

Herryanto Siatono wrote:

>I just realized that AuthenticationFailurePasswordEvent has been
>refactored/generalized to AuthenticationFailureBadCredentialsEvent.
>
>In previous version, I'm using it to log only invalid attempts only by user
>found in the database. Now with it being generalized I'll have to re-query
>my database to check if the user exists in the database.
>  
>
You can look inside the AuthenticationFailureBadCredentialsEvent by 
doing a getException(), and then seeing which exception it is (either 
BadCredentialsException or UsernameNotFoundException).


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Home: http://acegisecurity.sourceforge.net
Acegisecurity-developer mailing list
Acegisecurity-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Home: http://acegisecurity.sourceforge.net
Acegisecurity-developer mailing list
Acegisecurity-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer

Reply via email to