Results 1 to 7 of 7

Thread: How do i call beans after succesful login?

  1. #1
    Join Date
    Mar 2008
    Posts
    15

    Arrow How do i call beans after succesful login?

    I want to populate some beans after a succesful login but have no idea hos to automatically always call a bean after a sucessful login, please help!

    (Using Spring Security 2.0)

    Thanks!

  2. #2
    Join Date
    Oct 2007
    Posts
    27

    Default

    You should be able to specify the url you want to go to after login, by adding/updating the "defaultTargetUrl" property in the AuthenticationProcessingFilter. This target could be a controller that updates your bean, then redirects to another view or something.

    You would probably want to set "alwaysUseDefaultTargetUrl" to true in this case. Not sure if there's a better way to do it or now.

    Thanks,
    Eric

  3. #3
    Join Date
    Mar 2008
    Posts
    15

    Default

    Thanks mate, will try it out

    Quote Originally Posted by bessette View Post
    You should be able to specify the url you want to go to after login, by adding/updating the "defaultTargetUrl" property in the AuthenticationProcessingFilter. This target could be a controller that updates your bean, then redirects to another view or something.

    You would probably want to set "alwaysUseDefaultTargetUrl" to true in this case. Not sure if there's a better way to do it or now.

    Thanks,
    Eric

  4. #4
    Join Date
    Mar 2008
    Posts
    15

    Default

    Can't find a place to set alwaysUseDefaultTargetUrl in Spring Security 2.0, any idea guys?
    Thanks!

  5. #5
    Join Date
    May 2006
    Posts
    112

    Default

    look for a property in org.springframework.security.ui.webapp.Authenticat ionProcessingFilter

  6. #6
    Join Date
    Mar 2008
    Posts
    23

    Default

    Yes, "Some one" is absolutely right, to be more specific you can please check out the class "org.acegisecurity.ui.AbstractProcessingFilter", alwaysUseDefaultTargetUrl actually belongs to above class which is extended by AuthenticationProsessingFilter.

  7. #7
    Join Date
    Mar 2008
    Posts
    23

    Default

    If you have more confusion then please fell free to discuss.........

    Good Luck Dude,
    Gaurav

Posting Permissions

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