I'm using WSFederation and JWT tokens (WsFed for MVC and JWT for WebAPI).
I get a redirect to the SSO site from within my MVC views and not from my WebAPI as I would expect.
The problem I'm having is supressing the 401 redirect when loading a partial view via Jquery Ajax. I want to be able to catch the 401 status code and then update the page accordingly. Is there an attribute or filter I can use to supress WsFed redirection for
specific Controllers or Actions?
I'm guessing I need to do something in RedirectToIdentityProvider under the WsFederationAuthenticationNotifications, I'm just not sure what
RedirectToIdentityProvider = context =>