Results 1 to 7 of 7

Thread: Redirect after login

  1. #1
    Join Date
    Jun 2009
    Location
    Poland, Warsaw
    Posts
    33

    Default Redirect after login

    I've implemented OpenID authentication via Google accounts. After authentication, I would like to ask user for username (sometimes login from email is not the best) and process post-registration with captcha.

    Any idea how to do it ? Maybe some filter or something ?
    Regards

    Tom

  2. #2
    Join Date
    May 2005
    Location
    BEEK, The Netherlands
    Posts
    230

    Default

    Hi plissken,

    Did you find some solution for this?
    I'm having a similar scenario where I want to ask the authenticated user (e.g. twitter) to supply more user data.

  3. #3
    Join Date
    Jun 2009
    Location
    Poland, Warsaw
    Posts
    33

    Default

    No... I've no idea how to implement this :-/
    Regards

    Tom

  4. #4
    Join Date
    May 2005
    Location
    BEEK, The Netherlands
    Posts
    230

    Default

    To bad, hope somebody knows.



    I'm struggling with customizing Spring Security..

  5. #5
    Join Date
    Jan 2008
    Posts
    1,826

    Default

    Have you taken a look at the OpenID sample in master? It will automatically provision a user if they do not exist. It should be fairly trivial to modify the sample to your needs.

    HTH,
    Rob Winch - @rob_winch
    Spring Security Lead
    Pivotal

  6. #6
    Join Date
    May 2005
    Location
    BEEK, The Netherlands
    Posts
    230

    Default

    Thanks for reply rwinch,

    Yes I looked at the examples.
    In the openid example I can see a custom registeringUserService is used.
    But how can I use that one to redirect to a certain page.

    Cheers,
    Marcel

  7. #7
    Join Date
    Jan 2008
    Posts
    1,826

    Default

    You could create a custom AuthenticationSuccessHandler that looks to see if the user is marked as new. If it is, redirect the user to the captcha. You will likely want to prevent the user from actually getting registered until they solve the captcha. You could do this by not saving the user until the captcha is solved. At that time you could update the property to state the user is not new. Additionally, you will probably want to ensure the user is not allowed to access the application unless they have solved the captcha. You can do this by not allowing access if the user is new.
    Rob Winch - @rob_winch
    Spring Security Lead
    Pivotal

Posting Permissions

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