2
votes

We have an ASP.NET MVC 5 application which uses OWIN and WS-Federation to do authentication. OWIN has been set up to redirect a user to the login page as long as the user isn't logged in. As a result when the WS-Federation session token times out, the user will be redirected to the login page. This works as expected.

Now, the problem is we would like to add some message onto the login page saying you've been timed out blabla..., when the user is redirected to the login page because of the WS-Federation session token timeout. So I need detect within my ASP.NET MVC 5 application whether the WS-Federation session token is timeout or not when a user is redirected to the login page. But how can I do this? (Please NOTE: not detecting an ASP.NET session timeout) Many thanks.

1

1 Answers

1
votes

In the redirect back to the login include a value in the query to string to indicate a timeout, you may be able to include claims in the query string.

It sounds like you already have the redirect working but for clarity there's a "SignOutWreply" WsFederation property when setting up the pipeline and any user claims could be added in the AuthenticationProperties.RedirectUri property when calling the OwinContext's Authentication.SignOut method.