-
Notifications
You must be signed in to change notification settings - Fork 39
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
Support for injecting WebTokenRequest.Properties #207
Support for injecting WebTokenRequest.Properties #207
Conversation
Thanks Richasy for opening a Pull Request! The reviewers will test the PR and highlight if there is any merge conflict or changes required. If the PR is approved we will proceed to merge the pull request 🙌 |
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.
Couple of thoughts based on our recent learnings with nullability annotations.
Though also meant to ask @Sergio0694 about ramifications/overhead of empty initialized collection vs. null pointer in C#. In the other case I saw in our other toolkit code I wasn't worried about it as the collection was basically being initialized in the collection the majority of the time and would contain values, but here this isn't always going to be the case.
I mean, in general it's generally easier to work with an empty collection than a null value when it comes to enumerations.
CommunityToolkit.Authentication.Uwp/WebAccountProviderConfig.cs
Outdated
Show resolved
Hide resolved
eb67ebd
to
8c4c9db
Compare
Hey @Richasy just noticed your @Sergio0694 any thoughts on the initialization vs. null for better nullability practices here? |
The current setup seems fine, given the type already exists and it's public, and it's already mutable. Making those two empty dictionaries makes sense to avoid callers having to check for If this was being designed from scratch though, I'd recommend:
Given we can't make breaking changes and the existing code though, changes here seems ok 🙂 |
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.
LGTM - Thanks!
Fixes #
Support users to inject properties when building WebTokenRequest internally. In addition, sometimes the properties applicable to MSA do not support AAD, so the two are separated for injection separately.
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Users cannot intervene in the construction process of WebTokenRequest.
What is the new behavior?
Support adding custom properties when constructing WebTokenRequest.
PR Checklist
Please check if your PR fulfills the following requirements:
Other information