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

Fixed claims not being updated by just using the token for the userId #125

Merged
merged 2 commits into from
Dec 6, 2024

Conversation

ronaldhej
Copy link
Contributor

Description

  • The token is now just used to get the userId, which is then used to get the user's claims via the userManager. This should fix the bug with tokens not being refreshed whenever a user joins an organization for example.

  • Removed claim consolelog from testing

  • Changed auth policies from singletons to Scoped

Related issues

Tokens not refreshing their claims when a user joins an organization for example

Checklist

  • My code is in the right place.\
  • My code fully addresses the issue I was working on.
  • My code follows the style guidelines.
  • I have added relevant comments explaining the purpose and function of my code (if necessary).
  • I have created a pull request and notified the teams.

…laims from the userManager

- Removed claim consolelog from testing
Copy link
Contributor

@MertzAndreas MertzAndreas left a comment

Choose a reason for hiding this comment

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

Does this imply that roles live in the Token?

GirafAPI/Authorization/OrgAdminRequirement.cs Outdated Show resolved Hide resolved
GirafAPI/Authorization/OrgMemberRequirement.cs Outdated Show resolved Hide resolved
- Made both policies asynchronous
@ronaldhej ronaldhej merged commit 0a2670e into main Dec 6, 2024
1 check passed
@ronaldhej ronaldhej deleted the claim-checking branch December 6, 2024 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants