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.