You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 26, 2020. It is now read-only.
Copy file name to clipboardExpand all lines: docs/index.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -80,16 +80,16 @@ urlpatterns = patterns(
80
80
)
81
81
```
82
82
83
-
You can easily test if the endpoint is working by doing the following in your terminal, if you had a user created with the username **admin** and password **abc123**.
83
+
You can easily test if the endpoint is working by doing the following in your terminal, if you had a user created with the username **admin** and password **password123**.
84
84
85
85
```bash
86
-
$ curl -X POST -d "username=admin&password=abc123" http://localhost:8000/api-token-auth/
86
+
$ curl -X POST -d "username=admin&password=password123" http://localhost:8000/api-token-auth/
87
87
```
88
88
89
89
Alternatively, you can use all the content types supported by the Django REST framework to obtain the auth token. For example:
90
90
91
91
```bash
92
-
$ curl -X POST -H "Content-Type: application/json" -d '{"username":"admin","password":"abc123"}' http://localhost:8000/api-token-auth/
92
+
$ curl -X POST -H "Content-Type: application/json" -d '{"username":"admin","password":"password123"}' http://localhost:8000/api-token-auth/
93
93
```
94
94
95
95
Now in order to access protected api urls you must include the `Authorization: JWT <your_token>` header.
0 commit comments