Skip to content
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

Issue 1185 add token to request #1304

Merged
merged 16 commits into from
Aug 30, 2023

Conversation

jhnbyrn
Copy link
Contributor

@jhnbyrn jhnbyrn commented Aug 9, 2023

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

  • PR only contains one change (considered splitting up PR)
  • unit-test added
  • documentation updated
  • CHANGELOG.md updated (only for user relevant changes)
  • author name in AUTHORS

@codecov
Copy link

codecov bot commented Aug 15, 2023

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%> (ø)

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

@n2ygk
Copy link
Member

n2ygk commented Aug 25, 2023

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
Copy link
Contributor Author

jhnbyrn commented Aug 29, 2023

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
Copy link
Member

n2ygk commented Aug 29, 2023

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.

Copy link
Member

@n2ygk n2ygk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great @jhnbyrn. Thanks for this contribution.

@n2ygk n2ygk merged commit a4ae1d4 into jazzband:master Aug 30, 2023
26 checks passed
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.

Accessing client/application from request
2 participants