IdentityModel / oidc-client-js

OpenID Connect (OIDC) and OAuth2 protocol support for browser-based JavaScript applications
Apache License 2.0
2.43k stars 842 forks source link

fix: call getEpochTime to pass the correct time to joseUtil.validateJwt #1380

Open lvendrame opened 3 years ago

lvendrame commented 3 years ago

When we have a service to get the epoch time configured, it is ignored, since the getEpochTime function isn't called every time the validateJwt function is called, so it uses a fallback value to get the current client time.

The purpose of this PR is to fix it and call getEpochTime to avoid the fallback value. Added a code coverage report tool too.