question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

djoser.readthedocs.io not up-to-date

See original GitHub issue

“Latest” documentation on djoser.readthedocs.io is not 1.3.0, but some different version. Specifically, SERIALIZERS.current_user is missing from the settings documentation.

Compare: Outdated documentation on readthedocs Should-be documentation on github (CTRL-F “current_user”)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

6reactions
dekozacommented, Feb 9, 2019

I’m on it. We needed to regain the access to readthedocs from previous dev.

2reactions
peterkmurphycommented, Jan 23, 2019

I was able to migrate from 1.3.2 to 1.4.0 (and from rest_framework_jwt to rest_framework_simplejwt), but it wasn’t a pleasant couple of hours. My notes for the documentation, so as to save anyone else pain.

  1. POST to /v0/jwt/create with username and password. Before, the server returns JSON with one key “token” match a value (the JWT). In 1.4.0, the server returns two keys. There’s “access”, and its value is the JWT; it’s basically a replacement for “token”. There’s also “refresh”, and its value is used for refreshing tokens.
  2. In 1.3.2, the value for “token” can be used with POSTs to /v0/jwt/verify and /v0/jwt/refresh. In 1.4.0, the value for “access” is used for the verify URL (and for other places where you use JWT). But the value for “refresh” is used with /v0/jwt/refresh instead.
  3. When you are using rest_framework_jwt, you pass HTTP headers like:

Authorization: JWT <token>

The rest_framework_simplejwt expects headers like:

Authorization: Bearer <token>

Does that mean a rewrite of the code using your API ? Not necessarily; put something like this in your settings.py file

SIMPLE_JWT = {
    "AUTH_HEADER_TYPES": ("Bearer", "JWT"),
} 

I hope this information is of use for the document writers. Cheers.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Welcome to djoser's documentation! — djoser 2.0.1 ...
Welcome to djoser's documentation!¶ · Available endpoints · Supported authentication backends · Supported Python versions · Supported Django versions · Supported ...
Read more >
Migration Guide — djoser 1.1.5 documentation
The JWT Refresh endpoint requires the refresh token and returns a new access token. The JWT Verify endpoint no longer returns token ....
Read more >
Migration Guide — djoser 1.1.5 documentation
Migrating from 1.1 to 1.2¶. There is no urgent need to change anything as backward compatibility is retained. That being said we ask...
Read more >
Release 2.0.1 Piotr Szpetkowski - djoser's documentation!
REST implementation of Django authentication system. djoser library provides a set of Django Rest Framework.
Read more >
Release 1.1.5 Piotr Szpetkowski - djoser's documentation!
REST implementation of Django authentication system. djoser library provides a set of Django Rest Framework.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found