Results 1 to 3 of 3

Thread: Need help with loginCommand, petclinic standalone

  1. #1
    Join Date
    Dec 2004
    Location
    Buenos Aires, Argentina
    Posts
    73

    Default Need help with loginCommand, petclinic standalone

    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.
    Last edited by robyn; May 19th, 2006 at 05:13 AM.

  2. #2
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    This question is related to Spring Rich's lifecycle services, so it probably best belongs in that forum.

  3. #3
    Join Date
    Dec 2004
    Location
    Buenos Aires, Argentina
    Posts
    73

    Default Thanks Ben.

    Thanks Ben.

Similar Threads

  1. Replies: 6
    Last Post: Jan 21st, 2012, 10:32 AM
  2. Replies: 3
    Last Post: Mar 1st, 2010, 05:45 PM
  3. Use acegi in a standalone application
    By Tud in forum Security
    Replies: 4
    Last Post: Apr 8th, 2005, 06:39 PM
  4. Replies: 1
    Last Post: Mar 26th, 2005, 09:41 AM
  5. Replies: 1
    Last Post: Oct 13th, 2004, 03:10 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •