-
Notifications
You must be signed in to change notification settings - Fork 1
implement the OIDC UserInfo endpoint #42
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
Conversation
chris-okuda
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comments
| type UserInfo struct { | ||
| Subject string `json:"sub,omitempty"` | ||
| Name string `json:"name,omitempty"` | ||
| Email string `json:"email,omitempty"` | ||
| EmailVerified bool `json:"email_verified,omitempty"` | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can include other fields, and also can include fields based on the request, but for this basic version I only included the basic fields that should be required for the Compass integration.
| return | ||
| } | ||
|
|
||
| c.JSON(http.StatusOK, api.NewUserInfo(claims)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I chose not to return a signed/encrypted version of the claims as a JWT because it was more complex and was not required by the spec, unless the request specifically asks for the JWT claims, which is not the case for this integration since mozilla-django-oidc accepts JSON (see https://github.com/mozilla/mozilla-django-oidc/blob/86660c22c842d935551e3da7ab14709e53facd12/mozilla_django_oidc/auth.py#L275).
daniellemaxwell
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Scope of changes
Implement the basic OIDC UserInfo endpoint at
v1/oidc/userinfo(POST and GET).See: https://openid.net/specs/openid-connect-core-1_0.html#UserInfo
Fixes SC-36744
Type of change
Acceptance criteria
See spec.
Definition of Done
Reviewer(s) checklist