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
As you see in line 174, the code was performed manual JSON creation so when submitting the code to CYBS, it threw a bad_request error and I spend around half-day to identifying what is going wrong.
After that, I've found that the code block should be: var obj = new { digest = digest, digestAlgorithm = "SHA-256", iat = DateTime.Now.ToUniversalTime().ToString("r") }; jwtBody = JsonConvert.SerializeObject(obj);
Because when you perform the code by using manual JSON, it was not correct when generating the JWT token, and it always thrown bad_request. After I changed it to above code block, it's working normally.
The text was updated successfully, but these errors were encountered:
cybersource-rest-samples-csharp/Source/Samples/Authentication/StandAloneJWT.cs
Line 174 in 63e9781
As you see in line 174, the code was performed manual JSON creation so when submitting the code to CYBS, it threw a bad_request error and I spend around half-day to identifying what is going wrong.
After that, I've found that the code block should be:
var obj = new { digest = digest, digestAlgorithm = "SHA-256", iat = DateTime.Now.ToUniversalTime().ToString("r") }; jwtBody = JsonConvert.SerializeObject(obj);
Because when you perform the code by using manual JSON, it was not correct when generating the JWT token, and it always thrown bad_request. After I changed it to above code block, it's working normally.
The text was updated successfully, but these errors were encountered: