Skip to content

Bug: Custom Claims fail to propagate #54

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

BenjamenMeyer
Copy link

@BenjamenMeyer BenjamenMeyer commented Feb 16, 2024

  • Create a custom user type in order to add new claims; it is in the test package space in order to be external to mimic how users would need to do this
  • Add a test to the session using the custom user type and check for the new claim

NOTE: This presently fails as noted in #53
NOTE: Made this a draft PR since the code currently fails a go test ./... run due to the changes.

- Create a custom user type in order to add new claims; it is in
  the test package space in order to be external to mimic how
  users would need to do this
- Add a test to the session using the custom user type and check
  for the new claim

NOTE: This presently fails.
return json.Marshal(info)
}

func (ctu *CustomTestUser) Claim(scope []string, claims *mockoidc.IDTokenClaims) (jwt.Claims, error) {
Copy link

Choose a reason for hiding this comment

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

Claims not Claim, and then this works :)

Copy link
Author

Choose a reason for hiding this comment

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

@fredlb thanks - I applied the change and confirm it that the tests now pass

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

Successfully merging this pull request may close these issues.

2 participants