Brad Koch
Brad Koch

Reputation: 20267

Appropriate unauthorized response when using form based authentication

I have a web app that uses form based authentication. When an AJAX request fails due to session timeout, I need to send an appropriate notification. It looks like I could send:

When an AJAX request fails because the user is not authenticated, what then is the appropriate response?

Upvotes: 1

Views: 316

Answers (1)

Szocske
Szocske

Reputation: 7661

I tend to interpret 403 as "HTTP authorization will not help", and use it instead of 401 when not using HTTP authentication.

Upvotes: 1

Related Questions