Skip to content
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

OAuth2AuthenticationTokenMixinTests should anticipate a lower-precision timestamp #9461

Closed
jzheaux opened this issue Feb 16, 2021 · 0 comments
Assignees
Labels
in: oauth2 An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose) type: enhancement A general enhancement
Milestone

Comments

@jzheaux
Copy link
Contributor

jzheaux commented Feb 16, 2021

Instant can contain up to nine digits in its decimal part, but Jackson only supports microsecond precision by default. Given that, OAuth2AuthenticationTokenMixinTests should only assert that deserialized Instant values match their pre-serialized Instant values up to the microsecond.

Additional Details

This can be verified on Windows using JDK 11 and running OAuth2AuthenticationTokenMixinTests. Occassionally, the Instant obtained from the OS contains enough precision to cause rounding, making the assertions fail.

@jzheaux jzheaux added status: waiting-for-triage An issue we've not yet triaged type: enhancement A general enhancement labels Feb 16, 2021
jzheaux added a commit to jzheaux/spring-security that referenced this issue Feb 17, 2021
@jzheaux jzheaux added this to the 5.5.0-M3 milestone Apr 8, 2021
@jzheaux jzheaux removed the status: waiting-for-triage An issue we've not yet triaged label Apr 8, 2021
@jzheaux jzheaux self-assigned this Apr 8, 2021
@jzheaux jzheaux added the in: oauth2 An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose) label Apr 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: oauth2 An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant