Results 1 to 2 of 2

Thread: Logout then redirect back to flow

  1. #1
    Join Date
    Jun 2011
    Posts
    3

    Default Logout then redirect back to flow

    Using web flow 2.0.8 with spring 3.0.0 and spring security 3.0.0.

    We have certain flows that really only work if the user is not authenticated. E.g. registration.

    I'm wondering if someone has a good solution for detecting this at the start of a flow, redirecting a user to a logout URL, and then redirecting the user back to the original flow url that requires anonymous only access.

    I've made a MVC controller that will invalidate the current session and then redirect to a url specified as a parameter to the logout url.

    What I'm struggling with is what to do in my flows to make use of this.

    What I'd like to do is have my flow detect that there is currently an authenticated session, stop the flow, redirect the user to the logout url with the flow url as a parameter.

    Any advice/examples of how I put this in place would be of great help.

    Thanks,
    Skip

  2. #2
    Join Date
    Aug 2006
    Location
    Arequipa-Peru / South America
    Posts
    2,796

    Default

    Hello

    I'm wondering if someone has a good solution for detecting this at the start of a flow, redirecting a user to a logout URL, and then redirecting the user back to the original flow url that requires anonymous only access.
    You can add Spring Security within or starting your flow definition, did you do that?

    Or even before to execute the URL to start the flow you could intercept it with Spring Security
    - Manuel Jordan

    Kill Your Pride, Share Your Knowledge With All
    The Fear Of The LORD Is The Beginning Of Knowledge, But Fools Despise Wisdom And Discipline. Proverbs 1:7

    Blog


    Technical Reviewer of Apress

    • Pro SpringSource dm Server
    • Spring Enterprise Recipes: A Problem-Solution Approach
    • Spring Recipes: A Problem-Solution Approach, 2nd Edition
    • Pro Spring Integration
    • Pro Spring Batch
    • Pro Spring 3
    • Pro Spring MVC: With Web Flow
    • Pro Spring Security

Posting Permissions

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