Friday, December 29, 2017

Re: DRF JWT Token with Mobile

instead of:
curl -X POST -d "mobile=1234567890" http://localhost:8000/api-token-auth/

could you just use:
curl -X POST -d "username=1234567890" http://localhost:8000/api-token-auth/

In any case what's the use case here? This doesn't seem secure at all, to log in someone only using the username, even more using a public know information

On Fri, Dec 29, 2017 at 8:21 AM, Andréas Kühne <andreas.kuhne@hypercode.se> wrote:
Hi,

You will have to implement your own authentication backend to make that work.

See here for an example:

Regards,

Andréas

2017-12-29 5:25 GMT+01:00 Mukul Mantosh <mukulmantosh91@gmail.com>:
Django Rest Framework JWT (http://getblimp.github.io/django-rest-framework-jwt/) as specified that JWT token can be obtained by passing username and password.

Example:
$ curl -X POST -d "username=admin&password=password123" http://localhost:8000/api-token-auth/

How to obtain the JWT Token using only mobile number. 
$ curl -X POST -d "mobile=1234567890" http://localhost:8000/api-token-auth/

Normally JWT works with the combination of username and password but i want the token using the mobile number only.


On Thursday, December 28, 2017 at 6:22:07 PM UTC+5:30, Krishnasagar Subhedarpage wrote:
Can you elaborate question? Please add some background for it.
---
Krishnasagar



On Thu, Dec 28, 2017 at 1:40 PM, Mukul Mantosh <mukulma...@gmail.com> wrote:
How to get JWT Token in DRF using only mobile number as the parameter instead of email and password..

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/1b3ae8bb-2039-4aa9-8a9f-2c4ddb2ffc55%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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-users@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/b0d5e227-7488-4c86-b757-681c287a1558%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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-users@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/CAK4qSCc1g6LP0dC%3DSAUzOD17A5dEkTYtTHM96EP6rgNS3XerUA%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.

--
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-users@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/CAFWa6t%2BLqAiRZ83osVUHqVQdcZ0-aqF8%2B94X8j3omep7Mwpy0A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment