This repository was archived by the owner on May 26, 2020. It is now read-only.
Commit a62b8f6
authored
APIJWTClient login with any credential format
We're using emails as usernames in our project, but the `APIJWTClient.login` method assumes usernames are used.
Another option would be to use `get_username_field` [1](https://github.com/GetBlimp/django-rest-framework-jwt/blob/00f76e44da4a2b62075696cce1f583dd735ff197/rest_framework_jwt/compat.py#L22), but I think this is the better solution.
It matches what `django.test.client.Client` does [2](https://github.com/django/django/blob/9baf692a58de78dba13aa582098781675367c329/django/test/client.py#L613).1 parent 82f671b commit a62b8f6
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
| 12 | + | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
0 commit comments