Porting from Cookie based authentication to JWT (except admin portal)

22 views
Skip to first unread message

Prakash D

unread,
Apr 24, 2018, 11:18:15 AM4/24/18
to Django users

Hi I'm trying to port an existing application (which uses Django admin portal) to JWT authentication system so I can support native mobile clients. 

My proposed solution is having two manage.py files (will run on seaparate port numbers) and two settings.py files which will have different url routing. Is this the only way to do it?



Avraham Serour

unread,
Apr 24, 2018, 11:32:41 AM4/24/18
to django-users
I wouldn't use two settings to only achieve this, you can add multiple auth classes which django will try in a loop.

You can add the JWT and a custom class which can baseclass the login/password auth and only allow superusers to login

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/be19d2d1-d912-4780-a462-53d5e7da7595%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Prakash D

unread,
Apr 24, 2018, 11:39:44 AM4/24/18
to django...@googlegroups.com
If i don't remove contrib from middleware, Csrf header will be missing and that's a problem

On Tue, Apr 24, 2018, 9:02 PM Avraham Serour <tov...@gmail.com> wrote:
I wouldn't use two settings to only achieve this, you can add multiple auth classes which django will try in a loop.

You can add the JWT and a custom class which can baseclass the login/password auth and only allow superusers to login
On Tue, Apr 24, 2018 at 6:18 PM, Prakash D <cegpr...@gmail.com> wrote:

Hi I'm trying to port an existing application (which uses Django admin portal) to JWT authentication system so I can support native mobile clients. 

My proposed solution is having two manage.py files (will run on seaparate port numbers) and two settings.py files which will have different url routing. Is this the only way to do it?



--
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.

--
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 https://groups.google.com/group/django-users.
Reply all
Reply to author
Forward
0 new messages