I'm not sure if thisi is the righ forum for this help request. I've post it in the RC. Hope this is the right one. It's an Acegi question but it is a PetClinic standalone sample related question.
URL to my previous post follows:
http://<br /> <a href="http://forum...2144</a><br />
Hi, (newbie here)
After the (Petclinic standalone sample) application lifecycleadvisor triggers the logincommand, we expect two scenarios:
a. valid login
b. invalid login.
Q1. There is a 3rd scenario: If the user clicks on cancel (logincommand button).
In the actual sample, the app behaviour is not been affected by the login status of the user. Now, if we want to change this, where shoud we check for the valid/invalid login? Is it ok to check with
Code:
(SecureContext)ContextHolder.getContext()).getAuth entication().getPrincipal()
If yes, please advice the appropiate place to do this.
Q2. Scenarios A and B, authentication ok or invalid:
I´ve read that when having a valid login, acegui fires a Login event.
Where and how we should add listeners for this event to, for example enable certain commands? A quick code sample would help.
Thanks in advance,
Gustavo.


