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 CanSetUserinfoFromRequest interface #347

Merged
merged 2 commits into from
Mar 24, 2023

Conversation

muir
Copy link
Contributor

@muir muir commented Mar 24, 2023

This re-opens the abandoned #322

To support adding session-related claims (like a session id) to IDTokens, I've added a new (optional) add-on interface to Storage:

// CanSetUserinfoFromRequest is an optional additional interface that may be implemented by
// implementors of Storage.  It allows additional data to be set in id_tokens based on the
// request.
type CanSetUserinfoFromRequest interface {
	SetUserinfoFromRequest(ctx context.Context, userinfo *oidc.UserInfo, request IDTokenRequest, scopes []string) error
}

For the next major release, we drop SetUserinfoFromScopes in favor of the new SetUserinfoFromRequest. Switching is painless and can be done in advance.

@muir muir changed the title add CanSetUserinfoFromRequest interface feat: add CanSetUserinfoFromRequest interface Mar 24, 2023
@codecov
Copy link

codecov bot commented Mar 24, 2023

Codecov Report

Merging #347 (2719a47) into main (edc9a1f) will decrease coverage by 0.01%.
The diff coverage is 40.00%.

@@            Coverage Diff             @@
##             main     #347      +/-   ##
==========================================
- Coverage   50.94%   50.93%   -0.01%     
==========================================
  Files          74       74              
  Lines        5638     5643       +5     
==========================================
+ Hits         2872     2874       +2     
- Misses       2506     2508       +2     
- Partials      260      261       +1     
Impacted Files Coverage Δ
pkg/op/storage.go 50.00% <ø> (ø)
pkg/op/token.go 67.29% <40.00%> (-0.89%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

NEXT-RELEASE.md Outdated
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please move the follow up to the related issue #323. We want to use issues as main source and overview of TODO items.

@muhlemmer muhlemmer merged commit c9555c7 into zitadel:main Mar 24, 2023
@github-actions
Copy link

🎉 This PR is included in version 2.2.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@github-actions
Copy link

github-actions bot commented May 2, 2023

🎉 This PR is included in version 3.0.0-next.6 🎉

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants