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

feat: add CanTerminateSessionFromRequest interface #418

Merged
merged 1 commit into from
Jul 18, 2023

Conversation

livio-a
Copy link
Member

@livio-a livio-a commented Jul 17, 2023

To support access to all claims in the id_token_hint (like a sessionID), this PR adds a new (optional) add-on interface to the Storage:

// CanTerminateSessionFromRequest is an optional additional interface that may be implemented by
// implementors of Storage as an alternative to TerminateSession of the AuthStorage.
// It passes the complete parsed EndSessionRequest to the implementation, which allows access to additional data.
// It also allows to modify the uri, which will be used for redirection, (e.g. a UI where the user can consent to the logout)
type CanTerminateSessionFromRequest interface {
	TerminateSessionFromRequest(ctx context.Context, endSessionRequest *EndSessionRequest) (string, error)
}

required for zitadel/zitadel#6226

@codecov
Copy link

codecov bot commented Jul 17, 2023

Codecov Report

Merging #418 (f4660b6) into main (4c844da) will decrease coverage by 0.01%.
The diff coverage is 66.66%.

@@            Coverage Diff             @@
##             main     #418      +/-   ##
==========================================
- Coverage   52.69%   52.69%   -0.01%     
==========================================
  Files          74       74              
  Lines        5718     5724       +6     
==========================================
+ Hits         3013     3016       +3     
- Misses       2445     2446       +1     
- Partials      260      262       +2     
Impacted Files Coverage Δ
pkg/op/storage.go 50.00% <ø> (ø)
pkg/op/session.go 34.11% <66.66%> (+1.20%) ⬆️

@livio-a livio-a requested a review from stebenz July 17, 2023 14:50
@livio-a livio-a self-assigned this Jul 17, 2023
@livio-a livio-a merged commit be89c3b into main Jul 18, 2023
@livio-a livio-a deleted the terminat-session-from-request branch July 18, 2023 12:15
@github-actions
Copy link

🎉 This PR is included in version 2.7.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants