1
votes

I can successfully connect via CURL using the example posted in their documentation here:

http://getblimp.github.io/django-rest-framework-jwt/#usage

The problem comes from trying to use Postman. I set the authorization to Basic and put in my username/password and I get a 400 response with the following json:

{
  "username": [
    "This field is required."
  ],
  "password": [
    "This field is required."
  ]
}

I'm not sure if I'm missing something obvious.

1

1 Answers

2
votes

Instead of passing the username and password as part of the header send it as data in the body instead. Here's an example of doing this with jQuery: http://jpadilla.com/post/73791304724/auth-with-json-web-tokens

Taking from the example the data you pass in the body should look like this: { username: "admin", password: "abc123"}