Skip to content

Add RefreshOIDCToken middleware - #301

Open
GermanoGuerrini wants to merge 4 commits into
mozilla:mainfrom
GermanoGuerrini:refresh_token
Open

Add RefreshOIDCToken middleware#301
GermanoGuerrini wants to merge 4 commits into
mozilla:mainfrom
GermanoGuerrini:refresh_token

Conversation

@GermanoGuerrini

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

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
Copy Markdown

Any news on that ?

@Galtozzy

Galtozzy commented Aug 2, 2023

Copy link
Copy Markdown

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