jazzband / djangorestframework-simplejwt

A JSON Web Token authentication plugin for the Django REST Framework.
https://django-rest-framework-simplejwt.readthedocs.io/
MIT License
4k stars 662 forks source link

Cookie based authentication #777

Open Parbelaez opened 9 months ago

Parbelaez commented 9 months ago

Hello,

I see that the rest_framework_simplejwt.authentication.JWTAuthentication authentication class is only checking for the Authentication: Bearer Token header, but there is no way to do it directly with the cookies (no authentication header).

In fact, by default, it seems like Www-Authenticate is bearer dependent, and when using the dj-rest-framework JWTCookieAuthentication class is not overriding the authentication method.

Could a simpleJWT cookie exclusive authentication method be added?

Thanks!

Andrew-Chen-Wang commented 7 months ago

Track #71