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.
@@ -72,12 +72,12 @@ In your `urls.py` add the following URL route to enable obtaining a token via a
72
72
from rest_framework_jwt.views import obtain_jwt_token
73
73
#...
74
74
75
-
urlpatterns =patterns(
75
+
urlpatterns =[
76
76
'',
77
77
# ...
78
78
79
79
url(r'^api-token-auth/', obtain_jwt_token),
80
-
)
80
+
]
81
81
```
82
82
83
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**.
If `JWT_ALLOW_REFRESH` is True, issued tokens can be "refreshed" to obtain a new brand token with renewed expiration time. Add a URL pattern like this:
102
+
If `JWT_ALLOW_REFRESH` is True, **non-expired** tokens can be "refreshed" to obtain a brand new token with renewed expiration time. Add a URL pattern like this:
103
103
```python
104
104
from rest_framework_jwt.views import refresh_jwt_token
105
105
# ...
@@ -217,7 +217,7 @@ Default is `True`.
217
217
218
218
### JWT_LEEWAY
219
219
220
-
> This allows you to validate an expiration time which is in the past but no very far. For example, if you have a JWT payload with an expiration time set to 30 seconds after creation but you know that sometimes you will process it after 30 seconds, you can set a leeway of 10 seconds in order to have some margin.
220
+
This allows you to validate an expiration time which is in the past but not very far. For example, if you have a JWT payload with an expiration time set to 30 seconds after creation but you know that sometimes you will process it after 30 seconds, you can set a leeway of 10 seconds in order to have some margin.
0 commit comments