@simulacrum/auth0-simulator
Advanced tools
Comparing version 0.5.0 to 0.5.1
# Changelog | ||
## \[0.5.1] | ||
- Make the iat field epoch time. | ||
- [6e08689](https://github.com/thefrontside/simulacrum/commit/6e086899eaf085d1e12e2c8edfea56139d8b705b) make iat field epoch time ([#187](https://github.com/thefrontside/simulacrum/pull/187)) on 2022-03-15 | ||
## \[0.5.0] | ||
@@ -4,0 +9,0 @@ |
export declare const epochTime: (date?: number) => number; | ||
export declare const expiresAt: (hours?: number) => number; | ||
export declare const epochTimeToLocalDate: (epoch: number) => Date; | ||
//# sourceMappingURL=date.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.expiresAt = exports.epochTime = void 0; | ||
exports.epochTimeToLocalDate = exports.expiresAt = exports.epochTime = void 0; | ||
const epochTime = (date = Date.now()) => Math.floor(date / 1000); | ||
@@ -8,2 +8,8 @@ exports.epochTime = epochTime; | ||
exports.expiresAt = expiresAt; | ||
const epochTimeToLocalDate = (epoch) => { | ||
let date = new Date(0); | ||
date.setUTCSeconds(epoch); | ||
return date; | ||
}; | ||
exports.epochTimeToLocalDate = epochTimeToLocalDate; | ||
//# sourceMappingURL=date.js.map |
@@ -154,3 +154,3 @@ "use strict"; | ||
exp: (0, date_1.expiresAt)(), | ||
iat: Date.now(), | ||
iat: (0, date_1.epochTime)(), | ||
email: username, | ||
@@ -170,3 +170,3 @@ aud: clientID, | ||
sub: idTokenData.sub, | ||
iat: idTokenData.iat, | ||
iat: (0, date_1.epochTime)(), | ||
iss: idTokenData.iss, | ||
@@ -173,0 +173,0 @@ exp: idTokenData.exp, |
@@ -57,2 +57,8 @@ import type { SimulationState, Store } from '@simulacrum/server'; | ||
} | ||
export interface IdToken { | ||
payload: IdTokenData; | ||
} | ||
export interface AccessToken { | ||
payload: AccessTokenPayload; | ||
} | ||
//# sourceMappingURL=types.d.ts.map |
{ | ||
"name": "@simulacrum/auth0-simulator", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"description": "Run local instance of Auth0 API for local development and integration testing", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
97822
972