ruby-jwt
ruby-jwt copied to clipboard
Fix Time.now casting causing false positive in verify_at
Fixes #353
Hello, @kevinreedy! This is your first Pull Request that will be reviewed by SourceLevel, an automatic Code Review service. It will leave comments on this diff with potential issues and style violations found in the code as you push new commits. You can also see all the issues found on this Pull Request on its review page. Please check our documentation for more information.
Im wondering if the condition should be inclusive (>=) to handle cases where the verification happen on the same second the token has been issued.
Also a test verifying the "same-second" token would be good. Mocking the Time.now.to_i in a test could be a way to tackle the different cases.