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 <[email protected]>
wrote:

> Hi,
>
> You will have to implement your own authentication backend to make that
> work.
>
> See here for an example:
> https://chrisbartos.com/articles/how-to-implement-
> custom-authentication-with-django-rest-framework/
>
> Regards,
>
> Andréas
>
> 2017-12-29 5:25 GMT+01:00 Mukul Mantosh <[email protected]>:
>
>> Django Rest Framework JWT (http://getblimp.github.io/dja
>> ngo-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-toke
>> n-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 <[email protected]>
>>> 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 [email protected].
>>>> To post to this group, send email to [email protected].
>>>> Visit this group at https://groups.google.com/group/django-users.
>>>> To view this discussion on the web visit https://groups.google.com/d/ms
>>>> gid/django-users/1b3ae8bb-2039-4aa9-8a9f-2c4ddb2ffc55%40goog
>>>> legroups.com
>>>> <https://groups.google.com/d/msgid/django-users/1b3ae8bb-2039-4aa9-8a9f-2c4ddb2ffc55%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>> 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 [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit https://groups.google.com/d/ms
>> gid/django-users/b0d5e227-7488-4c86-b757-681c287a1558%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/b0d5e227-7488-4c86-b757-681c287a1558%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> 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 [email protected].
> To post to this group, send email to [email protected].
> 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%3DSAUzOD17A5dEkTYtTHM96EP6rgNS
> 3XerUA%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAK4qSCc1g6LP0dC%3DSAUzOD17A5dEkTYtTHM96EP6rgNS3XerUA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> 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 [email protected].
To post to this group, send email to [email protected].
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.

Reply via email to