You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
JsonSerializer should round trip AuthenticationProperties #20722
The problem here is that Newtonsoft.Json was very aggressive about trying to deserialize the type and would use the dictionary constructor to deserialize it. System.Text.Json does not do that. This is probably best handled by writing a JsonConverter using the new System.Text.Json APIs.
Can you provide more details as to what your scenario is and why you want to deserialize the Auth Properties?
Activity
pranavkm commentedon Apr 10, 2020
The properties do not have public setters. System.Text.Json currently does not have the ability to update a collection property.
brockallen commentedon Apr 10, 2020
For what it's worth, prior to ASP.NET Core 3.1, we used JSON.NET and it worked correctly.
analogrelay commentedon Apr 16, 2020
The problem here is that Newtonsoft.Json was very aggressive about trying to deserialize the type and would use the dictionary constructor to deserialize it. System.Text.Json does not do that. This is probably best handled by writing a JsonConverter using the new System.Text.Json APIs.
Can you provide more details as to what your scenario is and why you want to deserialize the Auth Properties?
brockallen commentedon Apr 17, 2020
Because this:
aspnetcore/src/Security/Authentication/OAuth/src/OAuthOptions.cs
Line 104 in 75e0115
Support roundtrip serialization with S.T.Json
Support round trip serialization of AuthenticationProperties with Sys…
PR (#2)