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
The following snippet works just fine on 7.0.0-preview but fails on 7.0.0-preview3 (TryGetPayloadValue returns false). It does work fine if you use an IList<string> instead of the string[]:
JsonWebTokentoken=newJsonWebToken("{\"alg\": \"RS256\",\"typ\": \"JWT\"}","{ \"prop1\": [\"value1\",\"value2\"], \"exp\": 1692706803,\"iat\": 1692703203,\"nbf\": 1692703203 }");// This does not workif(token.TryGetPayloadValue("prop1",outstring[]array)){Console.WriteLine("The array has been correctly deserialized.");}// This does not workif(token.TryGetPayloadValue("prop1",outList<string>list)){Console.WriteLine("The list has been correctly deserialized.");}// This worksif(token.TryGetPayloadValue("prop1",outIList<string>ilist)){Console.WriteLine("The list has been correctly deserialized.");}}
Consider the following JWT payload:
The following snippet works just fine on 7.0.0-preview but fails on 7.0.0-preview3 (
TryGetPayloadValue
returnsfalse
). It does work fine if you use anIList<string>
instead of thestring[]
:/cc @brentschmaltz @jennyf19 @keegan-caruso
The text was updated successfully, but these errors were encountered: