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

NewDefaultSession's SetSubject should set IDTokenClaims as well #796

Open
3 of 5 tasks
mitar opened this issue Mar 6, 2024 · 0 comments
Open
3 of 5 tasks

NewDefaultSession's SetSubject should set IDTokenClaims as well #796

mitar opened this issue Mar 6, 2024 · 0 comments
Labels
feat New feature or request.

Comments

@mitar
Copy link
Contributor

mitar commented Mar 6, 2024

Preflight checklist

Ory Network Project

No response

Describe your problem

openid.Session requires subject to be set. openid.NewDefaultSession() returns an openid.DefaultSession without subject set. It provides SetSubject to set the subject, but calling it still does not make the session have subject. It has to be set in IDTokenClaims as well.

Describe your ideal solution

		session := openid.NewDefaultSession()
		session.SetSubject(subject)

Should be enough.

Workarounds or alternatives

One currently has to set it manually:


		session := openid.NewDefaultSession()
		session.SetSubject(subject)
		session.IDTokenClaims().Subject = subject

Version

v0.46.1-0.20240213123944-f38352921f22

Additional Context

No response

@mitar mitar added the feat New feature or request. label Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request.
Projects
None yet
Development

No branches or pull requests

1 participant