-
Notifications
You must be signed in to change notification settings - Fork 6
Adding serializer for CredentialDescription in .NET 8+ #177
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
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.
Pull Request Overview
This PR adds a custom JSON serializer/deserializer for CredentialDescription to support new scenarios in .NET 8+. Key changes include:
- New test cases in CredentialDescriptionJsonConverterTest.cs validating roundtrip serialization for various CredentialSource values.
- Updates to the PublicAPI files to include the new CredentialDescriptionJsonConverter and related APIs.
- Implementation of CredentialDescriptionJsonConverter in the ApplicationOptions folder.
Reviewed Changes
Copilot reviewed 5 out of 7 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| test/Microsoft.Identity.Abstractions.Tests/CredentialDescriptionJsonConverterTest.cs | Adds tests to verify correct roundtrip serialization for different credential sources. |
| src/Microsoft.Identity.Abstractions/PublicAPI/net9.0/PublicAPI.Unshipped.txt | Exposes the new converter API for upcoming releases. |
| src/Microsoft.Identity.Abstractions/PublicAPI/net9.0/PublicAPI.Shipped.txt | Documents the shipped public API changes including the serializer. |
| src/Microsoft.Identity.Abstractions/ApplicationOptions/CredentialDescriptionJsonConverter.cs | Provides the implementation of the custom JSON converter for CredentialDescription. |
Files not reviewed (2)
- Directory.Build.props: Language not supported
- src/Microsoft.Identity.Abstractions/PublicAPI/net8.0/PublicAPI.Unshipped.txt: Language not supported
Comments suppressed due to low confidence (1)
test/Microsoft.Identity.Abstractions.Tests/CredentialDescriptionJsonConverterTest.cs:162
- Consider adding test cases for additional CredentialSource values (for instance, StoreWithDistinguishedName) to ensure that the converter handles all supported sources consistently.
public void SerializeDeserialize_CustomSignedAssertion()
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.
Other than the version, it looks right
Revert version Signed-off-by: Jean-Marc Prieur <[email protected]>
Add a custom serializer for CredentialDescription in .NET 8.
Fixes #176