mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-10 23:57:34 +02:00
jwt: round timestamp (#2258)
This commit is contained in:
parent
7f05133e3b
commit
40ddc2c4b3
2 changed files with 10 additions and 8 deletions
|
@ -56,6 +56,8 @@ func TestHeadersEvaluator(t *testing.T) {
|
|||
err = rawJWT.Claims(publicJWK, &claims)
|
||||
require.NoError(t, err)
|
||||
|
||||
assert.Equal(t, claims["exp"], math.Round(claims["exp"].(float64)))
|
||||
|
||||
assert.LessOrEqual(t, claims["exp"], float64(time.Now().Add(time.Minute*6).Unix()),
|
||||
"JWT should expire within 5 minutes, but got: %v", claims["exp"])
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue