Skip to content

[fix] Change JWT key name for following RFC6749 #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

[fix] Change JWT key name for following RFC6749 #2

wants to merge 1 commit into from

Conversation

NatLee
Copy link

@NatLee NatLee commented Jul 22, 2022

Hi!

感謝大大的教學文,但我在測試API的時候

發現原本的 simplejwt 套件內回傳的 token key name跟 RFC 上面的 key name 不同

https://www.rfc-editor.org/rfc/rfc6749#section-4.1.4

所以看起來是要override以符合規範

我的更動是新增一個model,然後參照這邊做修改

https://stackoverflow.com/questions/54544978/customizing-jwt-response-from-django-rest-framework-simplejwt

js的部分也修改完成,已測試都OK

再麻煩review一下,謝謝!

@twtrubiks
Copy link
Owner

@NatLee 非常感謝修正, 但為了維持教學文的簡單性(我暫時不太想 merge 進去),
我在想或許我把文章內多個連結說明, 導到這個 PR 你覺得如何呢?

@NatLee
Copy link
Author

NatLee commented Jul 22, 2022

@twtrubiks 沒問題的,謝謝!

@twtrubiks
Copy link
Owner

補上去了, commit 51955b84db0, 謝謝

@NatLee
Copy link
Author

NatLee commented Jul 23, 2022

好的,感謝大大

那麼這個commit就先close了 :)

@NatLee NatLee closed this Jul 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy