@block65/auth-token
Advanced tools
+3
-2
@@ -10,4 +10,4 @@ export interface AuthToken<TClaims extends AccessTokenClaims = AccessTokenClaims> { | ||
| isValid: () => boolean; | ||
| issuedAt: Date; | ||
| expiresAt: Date; | ||
| issuedAt: Date; | ||
| ttl: number; | ||
@@ -18,3 +18,4 @@ } | ||
| isValid: () => boolean; | ||
| expiresAt: number; | ||
| issuedAt: Date; | ||
| expiresAt: Date; | ||
| ttl: number; | ||
@@ -21,0 +22,0 @@ } |
+4
-3
@@ -34,4 +34,4 @@ "use strict"; | ||
| assertString(scope, 'scope is not a string'); | ||
| assertNumber(iat, 'iat is not a number'); | ||
| assertNumber(exp, 'exp is not a number'); | ||
| assertNumber(iat, 'iat is not a number'); | ||
| return Object.freeze({ | ||
@@ -58,6 +58,7 @@ id: jti, | ||
| const { exp, iat } = claims; | ||
| assertNumber(iat, 'iat is not a number'); | ||
| assertNumber(exp, 'exp is not a number'); | ||
| assertNumber(iat, 'iat is not a number'); | ||
| return Object.freeze({ | ||
| expiresAt: exp, | ||
| issuedAt: new Date(iat * 1000), | ||
| expiresAt: new Date(exp * 1000), | ||
| ttl: exp - iat, | ||
@@ -64,0 +65,0 @@ claims: claims, |
+1
-1
| { | ||
| "name": "@block65/auth-token", | ||
| "version": "3.0.0", | ||
| "version": "3.0.1", | ||
| "license": "UNLICENSED", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Explicitly unlicensed
LicenseSomething was found which is explicitly marked as unlicensed.
Found 1 instance in 1 package
Unidentified license
LicenseSomething that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
Explicitly unlicensed
LicenseSomething was found which is explicitly marked as unlicensed.
Found 1 instance in 1 package
Unidentified license
LicenseSomething that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
5726
1.33%149
1.36%