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.