Skip to content

Commit

Permalink
fix(typescript): update maxTokenAge type and examples
Browse files Browse the repository at this point in the history
  • Loading branch information
panva committed Feb 16, 2021
1 parent 812d0c1 commit 2c358e0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ export interface JWTClaimVerificationOptions {
/**
* Expected clock tolerance
* - in seconds when number (e.g. 5)
* - parsed as seconds when a string (e.g. "5 seconds").
* - parsed as seconds when a string (e.g. "5 seconds", "10 minutes", "2 hours").
*/
clockTolerance?: string | number

Expand All @@ -435,8 +435,10 @@ export interface JWTClaimVerificationOptions {

/**
* Maximum time elapsed (in seconds) from the JWT "iat" (Issued At) Claim value.
* - in seconds when number (e.g. 5)
* - parsed as seconds when a string (e.g. "5 seconds", "10 minutes", "2 hours").
*/
maxTokenAge?: string
maxTokenAge?: string | number

/**
* Expected JWT "sub" (Subject) Claim value.
Expand Down

0 comments on commit 2c358e0

Please sign in to comment.