I got an application which uses WIF and ADFS for authentication. This application is in Javascript/jQuery, and uses $.ajax calls to connect to an MVC Web Api.
Here is my issue, if the application goes idle for too long (30ish minutes), any subsequent call to the MVC Web API returns a 302 found code, which probably redirects to my ADFS authentication page.
However I do not know how to deal with the 302 Found message in an Ajax call. Is there any way for me to elegantly handle this call, then re-do my original Web API call?
Thank you.