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

Add RefreshOIDCToken middleware #301

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

GermanoGuerrini
Copy link
Contributor

I noticed that the library was missing the ability to use any refresh token issued by the provider.
It can be used in place of a silent user re-authentication (which does not work for the provider I was working with).
Information can be found here.
Now, while the implementation in this pull request works, it misses a proper provider response validation as described in the OpenID Specs.
That would require a serious refactoring in order to store extra information from the original response in a safer place than the user session, like the database, which currently isn't involved at all.
Plus, the validation should be factored out from the OIDCAuthenticationBackend to be re-used wherever needed.
Is there any interest in such contribution?

@codecov-io
Copy link

Codecov Report

Merging #301 into master will increase coverage by 0.66%.
The diff coverage is 97.22%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #301      +/-   ##
==========================================
+ Coverage    88.1%   88.76%   +0.66%     
==========================================
  Files           7        7              
  Lines         437      463      +26     
==========================================
+ Hits          385      411      +26     
  Misses         52       52
Impacted Files Coverage Δ
mozilla_django_oidc/auth.py 94.05% <100%> (+0.06%) ⬆️
mozilla_django_oidc/middleware.py 92.68% <96.29%> (+3.02%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cd84d40...1244996. Read the comment docs.

@titilambert
Copy link

Any news on that ?

@Galtozzy
Copy link

Galtozzy commented Aug 2, 2023

Any updates?

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.

4 participants