jazzband / django-oauth-toolkit

OAuth2 goodies for the Djangonauts!
https://django-oauth-toolkit.readthedocs.io
Other
3.06k stars 777 forks source link

Issue 1185 add token to request #1304

Closed jhnbyrn closed 10 months ago

jhnbyrn commented 11 months ago

Fixes #1185

Description of the Change

Add the Token object to the request in the middleware. This makes it easy to access the Application object in views.

Checklist

codecov[bot] commented 10 months ago

Codecov Report

Merging #1304 (43086b1) into master (01dd372) will increase coverage by 0.02%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1304      +/-   ##
==========================================
+ Coverage   97.35%   97.37%   +0.02%     
==========================================
  Files          32       32              
  Lines        2005     2022      +17     
==========================================
+ Hits         1952     1969      +17     
  Misses         53       53              
Files Changed Coverage Δ
oauth2_provider/middleware.py 100.00% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

n2ygk commented 10 months ago

Please fill out the checklist in the PR description above and add the issue number after Fixes #.

It is important to document any new functionality and to write automated tests. See https://django-oauth-toolkit.readthedocs.io/en/latest/contributing.html

jhnbyrn commented 10 months ago

Please fill out the checklist in the PR description above and add the issue number after Fixes #.

It is important to document any new functionality and to write automated tests. See https://django-oauth-toolkit.readthedocs.io/en/latest/contributing.html

Thanks for the feedback. I am not sure if this is considered relevant for the changelog - let me know. I've done the other stuff.

n2ygk commented 10 months ago

Please fill out the checklist in the PR description above and add the issue number after Fixes #. It is important to document any new functionality and to write automated tests. See https://django-oauth-toolkit.readthedocs.io/en/latest/contributing.html

Thanks for the feedback. I am not sure if this is considered relevant for the changelog - let me know. I've done the other stuff.

Yes please add to the changelog since you are adding functionality potentially used by some other user of the package. And please rebase since master has had some commits added.