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

Fix RP-initiated Logout with expired Django session #1270

Merged
merged 6 commits into from
May 20, 2023

Conversation

tonial
Copy link
Contributor

@tonial tonial commented May 15, 2023

Fixes #1269

Description of the Change

Fix RP initiated logout when there's no django session available.

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 May 15, 2023

Codecov Report

Merging #1270 (cf7c66d) into master (11294ab) will increase coverage by 0.10%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1270      +/-   ##
==========================================
+ Coverage   97.19%   97.29%   +0.10%     
==========================================
  Files          31       31              
  Lines        1994     1996       +2     
==========================================
+ Hits         1938     1942       +4     
+ Misses         56       54       -2     
Impacted Files Coverage Δ
oauth2_provider/views/oidc.py 100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes

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

@tonial tonial force-pushed the tonial/rp_logout_expired_session branch from 4f22a3a to d65cb9a Compare May 15, 2023 13:12
tests/test_oidc_views.py Outdated Show resolved Hide resolved
tests/test_oidc_views.py Outdated Show resolved Hide resolved
tests/test_oidc_views.py Outdated Show resolved Hide resolved
tests/test_oidc_views.py Outdated Show resolved Hide resolved
tonial and others added 5 commits May 15, 2023 15:42
Co-authored-by: François Freitag <mail@franek.fr>
Co-authored-by: François Freitag <mail@franek.fr>
Co-authored-by: François Freitag <mail@franek.fr>
@dopry
Copy link
Contributor

dopry commented May 20, 2023

@tonial good catch. I'm not super jazzed about the complex return type from _validate_logout_request. I feel like that could be broken up into a few discrete methods on the RPInitiatedLogoutView and more of the validation workflow could be lifted up into form_valid. Once I complete some local testing, I'll merge so we fix the breakage.

Copy link
Contributor

@dopry dopry left a comment

Choose a reason for hiding this comment

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

LGTM.

@dopry dopry merged commit 29da530 into jazzband:master May 20, 2023
28 checks passed
@tonial tonial deleted the tonial/rp_logout_expired_session branch May 22, 2023 08:10
@tonial tonial mentioned this pull request May 22, 2023
5 tasks
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.

RP-initiated Logout with expired django session not revoking the tokens
3 participants