J
J
Jekson2020-02-28 11:55:03
Django
Jekson, 2020-02-28 11:55:03

Authorization on JWT in Django Rest Framework?

It is necessary to implement an authorization system on JWT. I used this library djangorestframework_simplejwt
Everything works fine, one thing - it seems that it does not provide the logout functionality. The library, as I understand it, is recommended for working with DRF, and the absence of logout in it is not entirely clear to me. Tell me, maybe I don’t understand something and this is superfluous? Or can you share which library you are using. All I need is the login/logout functionality on the JWT.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrew, 2020-02-28
@Lepilov

In jwt, there is no such thing as a logout, a token either exists (and it is valid) or it does not exist or it is not valid (expired).
There is a blacklist for this.
A similar question was answered here

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question