**** I would post to the Acegi user list... however this has a framework
implementation question :)
I am looking into a hook point for Acegi, whereby I can update a users
failed logon attempts.. (on fail) as well
as zero out the users failed logon attempts, on successful authentication.
My first instinct is to register an AuthenticationEvent, as I see Acegi
will send notifications / events at those interesting points.
I do see an event for AuthenticationSuccess...
(AuthenticationSuccessEvent)...
http://acegisecurity.sourceforge.net/multiproject/acegi-security/apidocs/net/sf/acegisecurity/providers/dao/event/AuthenticationEvent.html
However for failed logons.. there are numerous events...more fine-grained
(which is good)..
Account expired, account disabled, account locked, cant find username, bad
credentials, etc. etc.
My question is then... do I handle all of the "failed" events.. ?
because there doesnt seem to be a common superclass, or interface
implemented...
Is this by design... or is there something else I can hook into, ?
Its not bad.. however I would have to look at 7 different failed events....
plus ... my other concern.. is if a "new" failure event is created in the
framework..
and I would then need to modify my code again to handle that auth failure
event...
I am curious if I am missing something...? Is there a single event that I
can handle for all failed authentication events..
or do I have to handle all 7?
Does it make sense for this to be refactored to have a single
AuthenticationFailureEvent...(class or interface) with the 7 subclasses or
implementors?
i.e.
AuthenticationEvent
AuthenticationSuccessEvent extends AuthenticationEvent
AuthenticationFailureEvent extends AuthenticationEvent
(all auth fail events subclass above OR make an interface
(marker perhaps) for AuthenticationFailureEvent ?)
Any thoughts?
Cheers,
Mark
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Home: http://acegisecurity.sourceforge.net
Acegisecurity-developer mailing list
Acegisecurity-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer