Django : DRF Token based Authentication VS JSON Web Token

280 views
Skip to first unread message

Ankit Agrawal

unread,
Jul 23, 2015, 9:01:16 PM7/23/15
to Django users

Hi everyone,


    I am building a real world application where users will access the app primarily from Android, iOS devices as well as Desktops.

From my elementary research, I have realized that token based authentication mechanism is more better and elegant for client-server models as compared to session based authentication.


In Django, I have found two popular ways to do this -

  1. http://www.django-rest-framework.org/api-guide/authentication/#tokenauthentication
  2. http://getblimp.github.io/django-rest-framework-jwt/

From what I understood, option 2] is an extension of 1] except that the Token is in the form of JSON(serialized). I would like to understand what other differences there are between option 1] and 2] and the advantages/disadvantages of choosing either.

Gergely Polonkai

unread,
Jul 24, 2015, 1:59:44 AM7/24/15
to django...@googlegroups.com

Hello,

after a quick read I cannot find any essential differences between the two, in regards of authentication. JWT, however, is much more fine grained and has a bunch of token manipulation options.

Best,
Gergely

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/11204a7d-a582-40bd-a9ba-e06abe23afff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages