Open Ectobius opened 8 years ago
Thank you for reporting this! I'll take a look today and work on a fix.
I think this is due to the SDK using the global json.net serialization settings. I wasn't able to reproduce to know for sure.
I've built the 1.5.1 branch (75b867c9076927eb6e8029b53e6878a1e1173ab4), and published the nuget package to myget as 1.5.1-beta1. Please try that out (the only change is this bug fix), and let me know if that resolves the problem for you. If it does, I'll release it officially.
No, unfortunately it doesn't resolve my problem.
I tried to debug the code and I've noticed that
IdentityToken.Expires
property contains date in en-us format but from server it comes in ISO 8601 format. Locale on my machine is not en-us so that parsing of theExpires
property fails andIdentityToken.IsExpired
is always false which causes the token to be refreshed. So to summarize: inside therefreshCallback
inOpenStackIdentityProvider.GetUserAccess
method: After executing this line:response.access.expires = "2016-01-29T10:46:36Z". And after executing this line:
access.Token.Expires = "01/29/2016 10:46:36". But
IdentityToken.Expires
property is intended to store expiration time in the format originally returned by the authentication response (as its comment indicates).