Skip to content

Commit

Permalink
feat(exp): add explainer for expiration
Browse files Browse the repository at this point in the history
  • Loading branch information
whitneypurdum committed Jul 27, 2022
1 parent 7261112 commit 5441a4f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/modules/claims/claims.service.ts
Expand Up @@ -1501,6 +1501,7 @@ export class ClaimsService {
if (!proofVerified) {
errors.push(ERROR_MESSAGES.PROOF_NOT_VERIFIED);
}
// Date.now() and JWT expiration time both identify the time elapsed since January 1, 1970 00:00:00 UTC
const isExpired = payload?.exp && payload?.exp * 1000 < Date.now();
if (isExpired) {
errors.push(ERROR_MESSAGES.CREDENTIAL_EXPIRED);
Expand Down

0 comments on commit 5441a4f

Please sign in to comment.