Why does SessionAuthentication in Django REST Framework Never Return HTTP401 -


Looking at Django REST Framework and, I think that sessionAuthentication returns only one HTTP 403 Codes while the other authentication square 401 will be returned. What is the reason for this?

Surely there are so many cases where the.

This problem is particularly problematic because "the first authentication class is set to the scene when determining the type of response." And session authentication by default is the first authentication class.

follows the Django REST framework, and 401 does not return feedback when authentication class WWW-authentication header can not be used.

The HTTP 401 responses should always contain a WWW-authentication header, which provides instructions to the client to authenticate. The HTTP 403 responses do not contain the WWW-authentication header.

-

Because session disbursement class can not be used in a WWW-authenticated header, Django REST Framework can not return 401 responses and still can follow the specification. You can set another authentication class around it, which supports the header at the top of your list, such as


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -