WebApiHMACAuthentication icon indicating copy to clipboard operation
WebApiHMACAuthentication copied to clipboard

Project shows how to implement HMAC Authentication is ASP.NET Web API 2

Results 4 WebApiHMACAuthentication issues
Sort by recently updated
recently updated
newest added

Current time tolerance calculation is done on unsigned longs. This results in an excessively large value when the API server time is behind client server time. This fix handles the...

var serverClock = TimeSpan.FromTicks(DateTime.UtcNow.Ticks); var requestClock = TimeSpan.FromTicks(DateTime.UtcNow.AddSeconds(1).Ticks); var serverTime = Convert.ToUInt64(serverClock.TotalSeconds); var requestTime = Convert.ToUInt64(requestClock.TotalSeconds); Console.WriteLine(serverTime - requestTime);