Blorc.OpenIdConnect
Blorc.OpenIdConnect copied to clipboard
Add user and profile claims
Description of Change
Models
- Extend
UserandProfileclass by adding claims defined inoidc-client-ts:
Useris mapped toUserProfileis mapped toIdTokenClaims
- Add
AdditionalDataproperty inProfileto allow unknown properties in the ID token, as identity providers may add new claims from time to time.
Extenstions
Support AsClaims for JsonElement.
Issues Resolved
It providers a better dev experience for integrating various identity providers. E.g. some developers may need to read the sub claim to handle user ID.
API Changes
None. I considered aligning nullable definitions, for example, making AccessToken required for User, but it appears to be a breaking change. So I've decided to leave them as they are.
Behavioral Changes
None
Testing Procedure
-
Updated and added unit tests for JSON and claim deserialization.
-
Tested locally with Logto, the sign-in flow works as expected.
PR Checklist
- [x] I have included examples or tests
- [ ] I have updated the change log (didn't find)
- [ ] I am listed in the CONTRIBUTORS file (didn't find)
- [x] Changes adhere to coding standard
- [x] I checked the licenses of Third Party software and discussed new dependencies with at least 1 other team member
@GeertvanHorrik @alexfdezsauco Apologize for the large pull request. Please let me know if it aligns with the direction of this project. Thank you for your time in advance.
Thanks, we'll review ASAP. I noticed you did a non-breaking change, but.... since this is a large update (improvement) and we want to upgrade to the 3.0.0 client anyway, this might be a good time to introduce breaking changes. So if you feel it will improve the component, go ahead :)
My compliments, really great work, thank you!
Please see the comments, hopefully they all make sense. If not, feel free to comment back 👍
I went through the comments, they are awesome! I'll update per your comments soon. Thank you for your time!
Can we help on that pull request to close it?
@alexfdezsauco can we close this one or does it need a lot of work?
Any news on this one?
Hello, Any update on this?
@GeertvanHorrik @alexfdezsauco
Can I help to finish this pull request? What is the matter?
We requested some changes to @gao-sun
@alexfdezsauco I'm gonna try to take over his work.
Closing this PR in favor of #636 . Thanks @gao-sun for the initial changes, the new PR will still contain your changes but we will try to finalize this PR with the help of @kjbtech .