-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get time from Clock [SDK-1973] #350
Comments
That would be ideal, but the The only reason to push back on a change that will let the developer pass the Clock instance is that you can put as much documentation and warning flags as you want, but anyone could still mistakenly use it and break the application. Is this only for testing purposes or your use case requires to use that NTP library to avoid time sync issues across apps/services? |
We are going to have consumer apps, and can not controll their internal clock, and we know from experience that some of them are off (by minutes or more). So the plan is to use an NTP library to get the correct current time, so that the app is unaffected by the time skew. I missed that backwards compatible target - then |
I think the java-jwt solution is an easy path forward. I need to evaluate if this can be set in a global way, maybe through the I'm tracking this as |
Describe the problem you'd like to have solved
We're using a NTP library to get the current time.
Describe the ideal solution
Get current time from a
java.time.Clock
instance instead ofSystem.currentTimeMillis()
. Probably unit-testing will be more simple as well.Alternatives and current work-arounds
Subclassing and/or cloning classes. Explicitly passing in the current time to methods.
Additional context
SecureCredentialsManager
The text was updated successfully, but these errors were encountered: