主权项 |
1. A method of synchronizing time between a device and an authentication service, the method comprising:
detecting, by an event handler executing on a processor on the device, a change in a time value on the device on a periodic basis and the periodic basis is set to reduce a battery drain of the device, wherein: the detecting comprises capturing an adjustment to the time value on the device through a callback to the event handler when the change in the time value occurs; accumulating a plurality of time changes to the time value on the device; determining a total time difference based on the plurality of time changes to the time value on the device; determining that the total time difference exceeds a credential mismatch time value; and retrieving, by the processor, a time value from an authentication service when the total time difference in the time value on the device exceeds the credential mismatch time value; generating, by the processor, a new time value based on at least the time value retrieved from the authentication service; and generating, by a software-based credential application executing by the processor, a time-based credential based on the new time value. |