@simulacrum/auth0-simulator 0.10.0 → 0.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/bin/start.js +9 -2
- package/dist/auth/constants.js +5 -2
- package/dist/auth/constants.js.map +1 -1
- package/dist/auth/date.d.ts.map +1 -1
- package/dist/auth/date.js +9 -3
- package/dist/auth/date.js.map +1 -1
- package/dist/auth/jwt.d.ts.map +1 -1
- package/dist/auth/jwt.js +11 -6
- package/dist/auth/jwt.js.map +1 -1
- package/dist/auth/refresh-token.d.ts +1 -1
- package/dist/auth/refresh-token.d.ts.map +1 -1
- package/dist/auth/refresh-token.js +12 -8
- package/dist/auth/refresh-token.js.map +1 -1
- package/dist/config/get-config.d.ts +1 -1
- package/dist/config/get-config.d.ts.map +1 -1
- package/dist/config/get-config.js +13 -13
- package/dist/config/get-config.js.map +1 -1
- package/dist/handlers/auth0-handlers.d.ts +2 -2
- package/dist/handlers/auth0-handlers.d.ts.map +1 -1
- package/dist/handlers/auth0-handlers.js +68 -57
- package/dist/handlers/auth0-handlers.js.map +1 -1
- package/dist/handlers/index.d.ts +2 -2
- package/dist/handlers/index.d.ts.map +1 -1
- package/dist/handlers/index.js +24 -17
- package/dist/handlers/index.js.map +1 -1
- package/dist/handlers/login-redirect.d.ts +1 -1
- package/dist/handlers/login-redirect.d.ts.map +1 -1
- package/dist/handlers/login-redirect.js +7 -3
- package/dist/handlers/login-redirect.js.map +1 -1
- package/dist/handlers/oauth-handlers.d.ts +4 -4
- package/dist/handlers/oauth-handlers.d.ts.map +1 -1
- package/dist/handlers/oauth-handlers.js +51 -42
- package/dist/handlers/oauth-handlers.js.map +1 -1
- package/dist/handlers/openid-handlers.d.ts.map +1 -1
- package/dist/handlers/openid-handlers.js +9 -5
- package/dist/handlers/openid-handlers.js.map +1 -1
- package/dist/handlers/url.d.ts.map +1 -1
- package/dist/handlers/url.js +5 -1
- package/dist/handlers/url.js.map +1 -1
- package/dist/handlers/utils.d.ts +3 -3
- package/dist/handlers/utils.d.ts.map +1 -1
- package/dist/handlers/utils.js +12 -7
- package/dist/handlers/utils.js.map +1 -1
- package/dist/handlers/web-message.js +12 -8
- package/dist/handlers/web-message.js.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +18 -12
- package/dist/index.js.map +1 -1
- package/dist/middleware/create-cors.js +9 -2
- package/dist/middleware/create-cors.js.map +1 -1
- package/dist/middleware/error-handling.js +4 -1
- package/dist/middleware/error-handling.js.map +1 -1
- package/dist/middleware/no-cache.js +5 -1
- package/dist/middleware/no-cache.js.map +1 -1
- package/dist/middleware/session.js +10 -3
- package/dist/middleware/session.js.map +1 -1
- package/dist/rules/extensionless-file-name.d.ts.map +1 -1
- package/dist/rules/extensionless-file-name.js +5 -1
- package/dist/rules/extensionless-file-name.js.map +1 -1
- package/dist/rules/parse-rules-files.js +18 -12
- package/dist/rules/parse-rules-files.js.map +1 -1
- package/dist/rules/rules-runner.d.ts +1 -1
- package/dist/rules/rules-runner.d.ts.map +1 -1
- package/dist/rules/rules-runner.js +60 -45
- package/dist/rules/rules-runner.js.map +1 -1
- package/dist/rules/types.js +2 -1
- package/dist/store/entities.d.ts.map +1 -1
- package/dist/store/entities.js +22 -17
- package/dist/store/entities.js.map +1 -1
- package/dist/store/index.d.ts +1 -1
- package/dist/store/index.d.ts.map +1 -1
- package/dist/store/index.js +16 -20
- package/dist/store/index.js.map +1 -1
- package/dist/types.js +21 -18
- package/dist/types.js.map +1 -1
- package/dist/views/login.d.ts +1 -1
- package/dist/views/login.d.ts.map +1 -1
- package/dist/views/login.js +7 -3
- package/dist/views/login.js.map +1 -1
- package/dist/views/username-password.d.ts +1 -1
- package/dist/views/username-password.d.ts.map +1 -1
- package/dist/views/username-password.js +7 -3
- package/dist/views/username-password.js.map +1 -1
- package/dist/views/web-message.d.ts +1 -1
- package/dist/views/web-message.d.ts.map +1 -1
- package/dist/views/web-message.js +10 -3
- package/dist/views/web-message.js.map +1 -1
- package/package.json +5 -3
package/README.md
CHANGED
|
@@ -33,7 +33,7 @@ This quick start assumes you have your own app with Auth0.
|
|
|
33
33
|
You may start a server directly from the command line.
|
|
34
34
|
|
|
35
35
|
```bash
|
|
36
|
-
npx auth0-simulator # this will start a simulation server at http://localhost:4400
|
|
36
|
+
npx @simulacrum/auth0-simulator # this will start a simulation server at http://localhost:4400
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
Given no further input, it will use the default values as below. This will point your app at the simulation instead of the Auth0 endpoint.
|
package/bin/start.js
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const auth0APIsimulator = require("../dist
|
|
2
|
+
const auth0APIsimulator = require("../dist");
|
|
3
|
+
const { defaultUser } = require("../dist/store/entities.js");
|
|
3
4
|
|
|
4
5
|
const app = auth0APIsimulator.simulation();
|
|
5
6
|
app.listen(4400, () =>
|
|
6
|
-
console.log(
|
|
7
|
+
console.log(
|
|
8
|
+
`Auth0 simulation server started at https://localhost:4400\n` +
|
|
9
|
+
`Visit the root route to view all available routes.\n\n` +
|
|
10
|
+
`Point your configuration at this simulation server and use the default user below.\n` +
|
|
11
|
+
`Email: ${defaultUser.email}\nPassword: ${defaultUser.password}\n` +
|
|
12
|
+
`\nPress Ctrl+C to stop the server`
|
|
13
|
+
)
|
|
7
14
|
);
|
package/dist/auth/constants.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.JWKS = exports.PRIVATE_KEY = void 0;
|
|
4
|
+
exports.PRIVATE_KEY = "-----BEGIN RSA PRIVATE KEY-----~~MIIEpAIBAAKCAQEAwzwwEqR5p7a6CaG61i3od+GLTyype3t/f0pwwtoA9NsZANcj~~HaAUR/qzqlNRQlLI687vF1OfbETYLeHIT5V36QG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BoUIupRY9KKuJCnd~~7d8MqhtiPuytwhGWJzW030KejvcK3wp1LeKCCRBaqQCr+csMj8kDZhMgtD0NiInx~~3V3hBVM/i4PuRSPWrhlGCX0CgYEAq/xR8TBaD2kqc0b0np6ap75/1WHhqaK9T42K~~oOOkuq8hI6vU1oQCGvfhXyChgRWHB/foI7xrGC53RkHKm0ioawEJa75whTVWTEaI~~bEuOKpOQSOJ6LBlckg9PtbzAZlBm0S6+DfUCjdEcoCXnUD1cz+qhZR+lC9TMI8Mb~~IRRMtIECgYBrVlenf/rHK1UMC3FDmkOzH7agShcDHqzFMR1/NcMDolZNXXFy/u4t~~nDxci1smAUQr4oNs1lk9UzCdt0+pVCjmhbriBngwsS6sazOesDft53w6RTczsRpa~~09YDfcXhnI5yT+vd5r4xA5HhyniY7W1ahSzGDYIGlVm5IReC3P6Caw==~~-----END RSA PRIVATE KEY-----~~";
|
|
5
|
+
exports.JWKS = {
|
|
3
6
|
keys: [
|
|
4
7
|
{
|
|
5
8
|
kty: "RSA",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/auth/constants.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/auth/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,WAAW,GACtB,4qDAA4qD,CAAC;AAElqD,QAAA,IAAI,GAAG;IAClB,IAAI,EAAE;QACJ;YACE,GAAG,EAAE,KAAK;YACV,CAAC,EAAE,wVAAwV;YAC3V,CAAC,EAAE,MAAM;YACT,GAAG,EAAE,OAAO;YACZ,GAAG,EAAE,wDAAwD;YAC7D,GAAG,EAAE,KAAK;SACX;KACF;CACF,CAAC"}
|
package/dist/auth/date.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../src/auth/date.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../src/auth/date.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,GAAI,aAAiB,KAAG,MAAiC,CAAC;AAEhF,eAAO,MAAM,SAAS,GAAI,cAAS,KAAG,MACA,CAAC;AAEvC,eAAO,MAAM,oBAAoB,GAAI,OAAO,MAAM,KAAG,IAIpD,CAAC"}
|
package/dist/auth/date.js
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.epochTimeToLocalDate = exports.expiresAt = exports.epochTime = void 0;
|
|
4
|
+
const epochTime = (date = Date.now()) => Math.floor(date / 1000);
|
|
5
|
+
exports.epochTime = epochTime;
|
|
6
|
+
const expiresAt = (hours = 1) => (0, exports.epochTime)() + hours * 60 * 60 * 1000;
|
|
7
|
+
exports.expiresAt = expiresAt;
|
|
8
|
+
const epochTimeToLocalDate = (epoch) => {
|
|
4
9
|
let date = new Date(0);
|
|
5
10
|
date.setUTCSeconds(epoch);
|
|
6
11
|
return date;
|
|
7
12
|
};
|
|
13
|
+
exports.epochTimeToLocalDate = epochTimeToLocalDate;
|
|
8
14
|
//# sourceMappingURL=date.js.map
|
package/dist/auth/date.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date.js","sourceRoot":"","sources":["../../src/auth/date.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"date.js","sourceRoot":"","sources":["../../src/auth/date.ts"],"names":[],"mappings":";;;AAAO,MAAM,SAAS,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,EAAE,EAAU,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC;AAAnE,QAAA,SAAS,aAA0D;AAEzE,MAAM,SAAS,GAAG,CAAC,KAAK,GAAG,CAAC,EAAU,EAAE,CAC7C,IAAA,iBAAS,GAAE,GAAG,KAAK,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAD1B,QAAA,SAAS,aACiB;AAEhC,MAAM,oBAAoB,GAAG,CAAC,KAAa,EAAQ,EAAE;IAC1D,IAAI,IAAI,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC;IACvB,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAC1B,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAJW,QAAA,oBAAoB,wBAI/B"}
|
package/dist/auth/jwt.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jwt.d.ts","sourceRoot":"","sources":["../../src/auth/jwt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGpC,eAAO,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"jwt.d.ts","sourceRoot":"","sources":["../../src/auth/jwt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGpC,eAAO,MAAM,QAAQ,GAAI,KAAK,MAAM,KAAG,MAAoC,CAAC;AAE5E,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AAE9C,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,WAAW,EACtD,OAAO,EAAE,CAAC,EACV,UAAU,SAAwB,EAClC,OAAO,GAAE,WAGR,GACA,MAAM,CAER"}
|
package/dist/auth/jwt.js
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseKey = void 0;
|
|
4
|
+
exports.createJsonWebToken = createJsonWebToken;
|
|
5
|
+
const jsonwebtoken_1 = require("jsonwebtoken");
|
|
6
|
+
const constants_ts_1 = require("./constants.js");
|
|
7
|
+
const parseKey = (key) => key.split("~~").join("\n");
|
|
8
|
+
exports.parseKey = parseKey;
|
|
9
|
+
function createJsonWebToken(payload, privateKey = (0, exports.parseKey)(constants_ts_1.PRIVATE_KEY), options = {
|
|
5
10
|
algorithm: "RS256",
|
|
6
|
-
keyid: JWKS.keys[0].kid,
|
|
11
|
+
keyid: constants_ts_1.JWKS.keys[0].kid,
|
|
7
12
|
}) {
|
|
8
|
-
return sign(payload, privateKey, options);
|
|
13
|
+
return (0, jsonwebtoken_1.sign)(payload, privateKey, options);
|
|
9
14
|
}
|
|
10
15
|
//# sourceMappingURL=jwt.js.map
|
package/dist/auth/jwt.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jwt.js","sourceRoot":"","sources":["../../src/auth/jwt.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"jwt.js","sourceRoot":"","sources":["../../src/auth/jwt.ts"],"names":[],"mappings":";;;AAQA,gDASC;AAhBD,+CAAoC;AACpC,iDAAmD;AAE5C,MAAM,QAAQ,GAAG,CAAC,GAAW,EAAU,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAA/D,QAAA,QAAQ,YAAuD;AAI5E,SAAgB,kBAAkB,CAChC,OAAU,EACV,UAAU,GAAG,IAAA,gBAAQ,EAAC,0BAAW,CAAC,EAClC,UAAuB;IACrB,SAAS,EAAE,OAAO;IAClB,KAAK,EAAE,mBAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG;CACxB;IAED,OAAO,IAAA,mBAAI,EAAC,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;AAC5C,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { GrantType, RefreshToken } from "../types";
|
|
1
|
+
import type { GrantType, RefreshToken } from "../types.ts";
|
|
2
2
|
export declare function issueRefreshToken(scope: string, grantType: GrantType): boolean;
|
|
3
3
|
export declare function createRefreshToken({ exp, rotations, scope, user, nonce, }: Omit<RefreshToken, "iat">): string;
|
|
4
4
|
//# sourceMappingURL=refresh-token.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refresh-token.d.ts","sourceRoot":"","sources":["../../src/auth/refresh-token.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"refresh-token.d.ts","sourceRoot":"","sources":["../../src/auth/refresh-token.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAK3D,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,SAAS,GACnB,OAAO,CAET;AAED,wBAAgB,kBAAkB,CAAC,EACjC,GAAG,EACH,SAAa,EACb,KAAK,EACL,IAAI,EACJ,KAAK,GACN,EAAE,IAAI,CAAC,YAAY,EAAE,KAAK,CAAC,GAAG,MAAM,CAapC"}
|
|
@@ -1,14 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.issueRefreshToken = issueRefreshToken;
|
|
4
|
+
exports.createRefreshToken = createRefreshToken;
|
|
5
|
+
const date_ts_1 = require("./date.js");
|
|
6
|
+
const base64_url_1 = require("base64-url");
|
|
7
|
+
const assert_ts_1 = require("assert-ts");
|
|
8
|
+
function issueRefreshToken(scope, grantType) {
|
|
5
9
|
return grantType === "refresh_token" || scope.includes("offline_access");
|
|
6
10
|
}
|
|
7
|
-
|
|
8
|
-
assert(!!user.id, `no identifier for user`);
|
|
9
|
-
return encode(JSON.stringify({
|
|
11
|
+
function createRefreshToken({ exp, rotations = 0, scope, user, nonce, }) {
|
|
12
|
+
(0, assert_ts_1.assert)(!!user.id, `no identifier for user`);
|
|
13
|
+
return (0, base64_url_1.encode)(JSON.stringify({
|
|
10
14
|
exp,
|
|
11
|
-
iat: epochTime(),
|
|
15
|
+
iat: (0, date_ts_1.epochTime)(),
|
|
12
16
|
rotations,
|
|
13
17
|
scope,
|
|
14
18
|
user: { id: user.id },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refresh-token.js","sourceRoot":"","sources":["../../src/auth/refresh-token.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"refresh-token.js","sourceRoot":"","sources":["../../src/auth/refresh-token.ts"],"names":[],"mappings":";;AAKA,8CAKC;AAED,gDAmBC;AA9BD,uCAAsC;AACtC,2CAAoC;AACpC,yCAAmC;AAEnC,SAAgB,iBAAiB,CAC/B,KAAa,EACb,SAAoB;IAEpB,OAAO,SAAS,KAAK,eAAe,IAAI,KAAK,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC;AAC3E,CAAC;AAED,SAAgB,kBAAkB,CAAC,EACjC,GAAG,EACH,SAAS,GAAG,CAAC,EACb,KAAK,EACL,IAAI,EACJ,KAAK,GACqB;IAC1B,IAAA,kBAAM,EAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC;IAE5C,OAAO,IAAA,mBAAM,EACX,IAAI,CAAC,SAAS,CAAC;QACb,GAAG;QACH,GAAG,EAAE,IAAA,mBAAS,GAAE;QAChB,SAAS;QACT,KAAK;QACL,IAAI,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE;QACrB,KAAK;KACN,CAAC,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { cosmiconfigSync } from "cosmiconfig";
|
|
2
|
-
import type { Auth0Configuration, ConfigSchema } from "../types";
|
|
2
|
+
import type { Auth0Configuration, ConfigSchema } from "../types.ts";
|
|
3
3
|
export declare const DefaultArgs: ConfigSchema;
|
|
4
4
|
type Explorer = ReturnType<typeof cosmiconfigSync>;
|
|
5
5
|
export declare function getConfigCreator(explorer: Explorer): (options?: Partial<Auth0Configuration>) => Auth0Configuration;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-config.d.ts","sourceRoot":"","sources":["../../src/config/get-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"get-config.d.ts","sourceRoot":"","sources":["../../src/config/get-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAKpE,eAAO,MAAM,WAAW,EAAE,YAIzB,CAAC;AAEF,KAAK,QAAQ,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AAkBnD,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,IAE/C,UAAU,OAAO,CAAC,kBAAkB,CAAC,KACpC,kBAAkB,CAoBtB;AAID,eAAO,MAAM,SAAS,aAzBR,OAAO,CAAC,kBAAkB,CAAC,KACpC,kBAwB8C,CAAC"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getConfig = exports.DefaultArgs = void 0;
|
|
4
|
+
exports.getConfigCreator = getConfigCreator;
|
|
5
|
+
const cosmiconfig_1 = require("cosmiconfig");
|
|
6
|
+
const types_ts_1 = require("../types.js");
|
|
3
7
|
const DefaultAuth0Port = 4400;
|
|
4
|
-
|
|
8
|
+
exports.DefaultArgs = {
|
|
5
9
|
clientID: "00000000000000000000000000000000",
|
|
6
10
|
audience: "https://thefrontside.auth0.com/api/v1/",
|
|
7
11
|
scope: "openid profile email offline_access",
|
|
@@ -19,21 +23,17 @@ function getPort({ domain, port }) {
|
|
|
19
23
|
}
|
|
20
24
|
// This higher order function would only be used for testing and
|
|
21
25
|
// allows different cosmiconfig instances to be used for testing
|
|
22
|
-
|
|
26
|
+
function getConfigCreator(explorer) {
|
|
23
27
|
return function getConfig(options) {
|
|
24
28
|
let searchResult = explorer.search();
|
|
25
|
-
let config = searchResult === null ? DefaultArgs : searchResult.config;
|
|
29
|
+
let config = searchResult === null ? exports.DefaultArgs : searchResult.config;
|
|
26
30
|
let strippedOptions = options !== null && options !== void 0 ? options : {};
|
|
27
|
-
let configuration = {
|
|
28
|
-
...DefaultArgs,
|
|
29
|
-
...config,
|
|
30
|
-
...strippedOptions,
|
|
31
|
-
};
|
|
31
|
+
let configuration = Object.assign(Object.assign(Object.assign({}, exports.DefaultArgs), config), strippedOptions);
|
|
32
32
|
configuration.port = getPort(configuration);
|
|
33
|
-
configurationSchema.parse(configuration);
|
|
33
|
+
types_ts_1.configurationSchema.parse(configuration);
|
|
34
34
|
return configuration;
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
const explorer = cosmiconfigSync("auth0Simulator");
|
|
38
|
-
|
|
37
|
+
const explorer = (0, cosmiconfig_1.cosmiconfigSync)("auth0Simulator");
|
|
38
|
+
exports.getConfig = getConfigCreator(explorer);
|
|
39
39
|
//# sourceMappingURL=get-config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-config.js","sourceRoot":"","sources":["../../src/config/get-config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-config.js","sourceRoot":"","sources":["../../src/config/get-config.ts"],"names":[],"mappings":";;;AA8BA,4CAuBC;AArDD,6CAA8C;AAE9C,0CAAk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,gBAAgB,CAAC,QAAQ,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ExtendedSimulationStore } from "../store";
|
|
1
|
+
import type { ExtendedSimulationStore } from "../store/index.ts";
|
|
2
2
|
import type { Request, RequestHandler } from "express";
|
|
3
|
-
import type { Auth0Configuration } from "../types";
|
|
3
|
+
import type { Auth0Configuration } from "../types.ts";
|
|
4
4
|
export type Routes = "/heartbeat" | "/authorize" | "/login" | "/usernamepassword/login" | "/login/callback" | "/oauth/token" | "/v2/logout" | "/userinfo";
|
|
5
5
|
export type AuthSession = {
|
|
6
6
|
username: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth0-handlers.d.ts","sourceRoot":"","sources":["../../src/handlers/auth0-handlers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"auth0-handlers.d.ts","sourceRoot":"","sources":["../../src/handlers/auth0-handlers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACvD,OAAO,KAAK,EACV,kBAAkB,EAGnB,MAAM,aAAa,CAAC;AAYrB,MAAM,MAAM,MAAM,GACd,YAAY,GACZ,YAAY,GACZ,QAAQ,GACR,yBAAyB,GACzB,iBAAiB,GACjB,cAAc,GACd,YAAY,GACZ,WAAW,CAAC;AAEhB,MAAM,MAAM,WAAW,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAc9D,eAAO,MAAM,mBAAmB,GAC9B,iBAAiB,uBAAuB,EACxC,YAAY,CAAC,OAAO,EAAE,OAAO,KAAK,MAAM,EACxC,SAAS,kBAAkB,EAC3B,OAAO,OAAO,KACb,MAAM,CAAC,MAAM,EAAE,cAAc,CA8N/B,CAAC"}
|
|
@@ -1,13 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.createAuth0Handlers = void 0;
|
|
13
|
+
const login_redirect_ts_1 = require("./login-redirect.js");
|
|
14
|
+
const web_message_ts_1 = require("./web-message.js");
|
|
15
|
+
const login_ts_1 = require("../views/login.js");
|
|
16
|
+
const oauth_handlers_ts_1 = require("./oauth-handlers.js");
|
|
17
|
+
const assert_ts_1 = require("assert-ts");
|
|
18
|
+
const querystring_1 = require("querystring");
|
|
19
|
+
const base64_url_1 = require("base64-url");
|
|
20
|
+
const username_password_ts_1 = require("../views/username-password.js");
|
|
21
|
+
const jsonwebtoken_1 = require("jsonwebtoken");
|
|
22
|
+
const utils_ts_1 = require("./utils.js");
|
|
11
23
|
const createLogger = (debug) => ({
|
|
12
24
|
log: (...args) => {
|
|
13
25
|
if (!debug) {
|
|
@@ -16,12 +28,12 @@ const createLogger = (debug) => ({
|
|
|
16
28
|
console.dir(...args);
|
|
17
29
|
},
|
|
18
30
|
});
|
|
19
|
-
|
|
31
|
+
const createAuth0Handlers = (simulationStore, serviceURL, options, debug) => {
|
|
20
32
|
let { audience, scope, clientID, rulesDirectory } = options;
|
|
21
|
-
let personQuery = createPersonQuery(simulationStore);
|
|
33
|
+
let personQuery = (0, utils_ts_1.createPersonQuery)(simulationStore);
|
|
22
34
|
let authorizeHandlers = {
|
|
23
|
-
query: createLoginRedirectHandler(options),
|
|
24
|
-
web_message: createWebMessageHandler(),
|
|
35
|
+
query: (0, login_redirect_ts_1.createLoginRedirectHandler)(options),
|
|
36
|
+
web_message: (0, web_message_ts_1.createWebMessageHandler)(),
|
|
25
37
|
};
|
|
26
38
|
let logger = createLogger(debug);
|
|
27
39
|
return {
|
|
@@ -38,7 +50,7 @@ export const createAuth0Handlers = (simulationStore, serviceURL, options, debug)
|
|
|
38
50
|
},
|
|
39
51
|
});
|
|
40
52
|
let currentUser = req.query.currentUser;
|
|
41
|
-
assert(!!req.session, "no session");
|
|
53
|
+
(0, assert_ts_1.assert)(!!req.session, "no session");
|
|
42
54
|
if (currentUser) {
|
|
43
55
|
// the request is a silent login.
|
|
44
56
|
// We fake an existing login by
|
|
@@ -46,7 +58,7 @@ export const createAuth0Handlers = (simulationStore, serviceURL, options, debug)
|
|
|
46
58
|
req.session.username = currentUser;
|
|
47
59
|
}
|
|
48
60
|
let responseMode = ((_a = req.query.response_mode) !== null && _a !== void 0 ? _a : "query");
|
|
49
|
-
assert(["query", "web_message"].includes(responseMode), `unknown response_mode ${responseMode}`);
|
|
61
|
+
(0, assert_ts_1.assert)(["query", "web_message"].includes(responseMode), `unknown response_mode ${responseMode}`);
|
|
50
62
|
let handler = authorizeHandlers[responseMode];
|
|
51
63
|
handler(req, res, next);
|
|
52
64
|
},
|
|
@@ -56,8 +68,8 @@ export const createAuth0Handlers = (simulationStore, serviceURL, options, debug)
|
|
|
56
68
|
let query = req.query;
|
|
57
69
|
let responseClientId = (_a = query.client_id) !== null && _a !== void 0 ? _a : clientID;
|
|
58
70
|
let responseAudience = (_b = query.audience) !== null && _b !== void 0 ? _b : audience;
|
|
59
|
-
assert(!!responseClientId, `no clientID assigned`);
|
|
60
|
-
let html = loginView({
|
|
71
|
+
(0, assert_ts_1.assert)(!!responseClientId, `no clientID assigned`);
|
|
72
|
+
let html = (0, login_ts_1.loginView)({
|
|
61
73
|
domain: new URL(serviceURL(req)).host,
|
|
62
74
|
scope,
|
|
63
75
|
redirectUri: query.redirect_uri,
|
|
@@ -74,9 +86,9 @@ export const createAuth0Handlers = (simulationStore, serviceURL, options, debug)
|
|
|
74
86
|
"/usernamepassword/login": { body: req.body, query: req.query },
|
|
75
87
|
});
|
|
76
88
|
let { username, nonce, password } = req.body;
|
|
77
|
-
assert(!!username, "no username in /usernamepassword/login");
|
|
78
|
-
assert(!!nonce, "no nonce in /usernamepassword/login");
|
|
79
|
-
assert(!!req.session, "no session");
|
|
89
|
+
(0, assert_ts_1.assert)(!!username, "no username in /usernamepassword/login");
|
|
90
|
+
(0, assert_ts_1.assert)(!!nonce, "no nonce in /usernamepassword/login");
|
|
91
|
+
(0, assert_ts_1.assert)(!!req.session, "no session");
|
|
80
92
|
let user = personQuery((person) => {
|
|
81
93
|
var _a;
|
|
82
94
|
return ((_a = person.email) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === username.toLowerCase() &&
|
|
@@ -86,8 +98,8 @@ export const createAuth0Handlers = (simulationStore, serviceURL, options, debug)
|
|
|
86
98
|
let query = req.query;
|
|
87
99
|
let responseClientId = (_a = query.client_id) !== null && _a !== void 0 ? _a : clientID;
|
|
88
100
|
let responseAudience = (_b = query.audience) !== null && _b !== void 0 ? _b : audience;
|
|
89
|
-
assert(!!clientID, `no clientID assigned`);
|
|
90
|
-
let html = loginView({
|
|
101
|
+
(0, assert_ts_1.assert)(!!clientID, `no clientID assigned`);
|
|
102
|
+
let html = (0, login_ts_1.loginView)({
|
|
91
103
|
domain: new URL(serviceURL(req)).host,
|
|
92
104
|
scope,
|
|
93
105
|
redirectUri: query.redirect_uri,
|
|
@@ -105,7 +117,7 @@ export const createAuth0Handlers = (simulationStore, serviceURL, options, debug)
|
|
|
105
117
|
[nonce]: { username, nonce },
|
|
106
118
|
}),
|
|
107
119
|
]));
|
|
108
|
-
res.status(200).send(userNamePasswordForm(req.body));
|
|
120
|
+
res.status(200).send((0, username_password_ts_1.userNamePasswordForm)(req.body));
|
|
109
121
|
},
|
|
110
122
|
["/login/callback"]: function (req, res) {
|
|
111
123
|
let wctx = JSON.parse(req.body.wctx);
|
|
@@ -115,43 +127,41 @@ export const createAuth0Handlers = (simulationStore, serviceURL, options, debug)
|
|
|
115
127
|
let { redirect_uri, nonce } = wctx;
|
|
116
128
|
const session = simulationStore.schema.sessions.selectById(simulationStore.store.getState(), { id: nonce });
|
|
117
129
|
const { username } = session !== null && session !== void 0 ? session : {};
|
|
118
|
-
let encodedNonce = encode(`${nonce}:${username}`);
|
|
119
|
-
let qs = stringify({ code: encodedNonce,
|
|
130
|
+
let encodedNonce = (0, base64_url_1.encode)(`${nonce}:${username}`);
|
|
131
|
+
let qs = (0, querystring_1.stringify)(Object.assign({ code: encodedNonce }, wctx));
|
|
120
132
|
let routerUrl = `${redirect_uri}?${qs}`;
|
|
121
133
|
res.status(302).redirect(routerUrl);
|
|
122
134
|
},
|
|
123
|
-
["/oauth/token"]:
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
next(error);
|
|
148
|
-
}
|
|
135
|
+
["/oauth/token"]: function (req, res, next) {
|
|
136
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
137
|
+
var _a, _b, _c, _d;
|
|
138
|
+
logger.log({ "/oauth/token": { body: req.body, query: req.query } });
|
|
139
|
+
try {
|
|
140
|
+
let iss = serviceURL(req);
|
|
141
|
+
let responseClientId = (_b = (_a = req === null || req === void 0 ? void 0 : req.body) === null || _a === void 0 ? void 0 : _a.client_id) !== null && _b !== void 0 ? _b : clientID;
|
|
142
|
+
let responseAudience = (_d = (_c = req === null || req === void 0 ? void 0 : req.body) === null || _c === void 0 ? void 0 : _c.audience) !== null && _d !== void 0 ? _d : audience;
|
|
143
|
+
(0, assert_ts_1.assert)(!!responseClientId, "500::no clientID in options or request body");
|
|
144
|
+
let tokens = yield (0, oauth_handlers_ts_1.createTokens)({
|
|
145
|
+
simulationStore,
|
|
146
|
+
body: req.body,
|
|
147
|
+
iss,
|
|
148
|
+
clientID: responseClientId,
|
|
149
|
+
audience: responseAudience,
|
|
150
|
+
rulesDirectory,
|
|
151
|
+
scope,
|
|
152
|
+
});
|
|
153
|
+
res.status(200).json(Object.assign(Object.assign({}, tokens), { expires_in: 86400, token_type: "Bearer" }));
|
|
154
|
+
}
|
|
155
|
+
catch (error) {
|
|
156
|
+
next(error);
|
|
157
|
+
}
|
|
158
|
+
});
|
|
149
159
|
},
|
|
150
160
|
["/v2/logout"]: function (req, res) {
|
|
151
161
|
var _a;
|
|
152
162
|
req.session = null;
|
|
153
163
|
let returnToUrl = (_a = req.query.returnTo) !== null && _a !== void 0 ? _a : req.headers.referer;
|
|
154
|
-
assert(typeof returnToUrl === "string", `no logical returnTo url`);
|
|
164
|
+
(0, assert_ts_1.assert)(typeof returnToUrl === "string", `no logical returnTo url`);
|
|
155
165
|
res.redirect(returnToUrl);
|
|
156
166
|
},
|
|
157
167
|
["/userinfo"]: function (req, res) {
|
|
@@ -164,13 +174,13 @@ export const createAuth0Handlers = (simulationStore, serviceURL, options, debug)
|
|
|
164
174
|
else {
|
|
165
175
|
token = (_b = req === null || req === void 0 ? void 0 : req.query) === null || _b === void 0 ? void 0 : _b.access_token;
|
|
166
176
|
}
|
|
167
|
-
assert(!!token, "no authorization header or access_token");
|
|
168
|
-
let { sub } =
|
|
177
|
+
(0, assert_ts_1.assert)(!!token, "no authorization header or access_token");
|
|
178
|
+
let { sub } = (0, jsonwebtoken_1.decode)(token, { json: true });
|
|
169
179
|
let user = personQuery((person) => {
|
|
170
|
-
assert(!!person.id, `no email defined on person scenario`);
|
|
180
|
+
(0, assert_ts_1.assert)(!!person.id, `no email defined on person scenario`);
|
|
171
181
|
return person.id === sub;
|
|
172
182
|
});
|
|
173
|
-
assert(!!user, "no user in /userinfo");
|
|
183
|
+
(0, assert_ts_1.assert)(!!user, "no user in /userinfo");
|
|
174
184
|
let userinfo = {
|
|
175
185
|
sub,
|
|
176
186
|
name: user.name,
|
|
@@ -185,4 +195,5 @@ export const createAuth0Handlers = (simulationStore, serviceURL, options, debug)
|
|
|
185
195
|
},
|
|
186
196
|
};
|
|
187
197
|
};
|
|
198
|
+
exports.createAuth0Handlers = createAuth0Handlers;
|
|
188
199
|
//# sourceMappingURL=auth0-handlers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth0-handlers.js","sourceRoot":"","sources":["../../src/handlers/auth0-handlers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"auth0-handlers.js","sourceRoot":"","sources":["../../src/handlers/auth0-handlers.ts"],"names":[],"mappings":";;;;;;;;;;;;AAOA,2DAAiE;AACjE,qDAA2D;AAC3D,gDAA8C;AAC9C,2DAAmD;AACnD,yCAAmC;AACnC,6CAAwC;AACxC,2CAAoC;AACpC,wEAAqE;AACrE,+CAAqD;AACrD,yCAA+C;AAgB/C,MAAM,YAAY,GAAG,CAAC,KAAc,EAAE,EAAE,CAAC,CAAC;IACxC,GAAG,EAAE,CAAC,GAAG,IAAgB,EAAQ,EAAE;QACjC,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,OAAO;QACT,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;IACvB,CAAC;CACF,CAAC,CAAC;AAEI,MA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C,MAAM,CAAC,EAAE,EAAE,qCAAqC,CAAC,CAAC;gBAE3D,OAAO,MAAM,CAAC,EAAE,KAAK,GAAG,CAAC;YAC3B,CAAC,CAAC,CAAC;YAEH,IAAA,kBAAM,EAAC,CAAC,CAAC,IAAI,EAAE,sBAAsB,CAAC,CAAC;YAEvC,IAAI,QAAQ,GAAG;gBACb,GAAG;gBACH,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,UAAU,EAAE,IAAI,CAAC,IAAI;gBACrB,WAAW,EAAE,IAAI,CAAC,IAAI;gBACtB,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,cAAc,EAAE,IAAI;gBACpB,MAAM,EAAE,IAAI;gBACZ,EAAE,EAAE,UAAU;aACf,CAAC;YAEF,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACjC,CAAC;KACF,CAAC;AACJ,CAAC,CAAC;AAnOW,QAAA,mBAAmB,uBAmO9B"}
|
package/dist/handlers/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Express } from "express";
|
|
2
|
-
import type { ExtendedSimulationStore } from "../store";
|
|
3
|
-
import { Auth0Configuration } from "../types";
|
|
2
|
+
import type { ExtendedSimulationStore } from "../store/index.ts";
|
|
3
|
+
import { Auth0Configuration } from "../types.ts";
|
|
4
4
|
export declare const extendRouter: (config: Auth0Configuration, debug?: boolean) => (router: Express, simulationStore: ExtendedSimulationStore) => void;
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/handlers/index.ts"],"names":[],"mappings":"AAAA,OAAgB,EAAgB,KAAK,OAAO,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/handlers/index.ts"],"names":[],"mappings":"AAAA,OAAgB,EAAgB,KAAK,OAAO,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAQjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAGjD,eAAO,MAAM,YAAY,GACtB,QAAQ,kBAAkB,EAAE,eAAa,MACzC,QAAQ,OAAO,EAAE,iBAAiB,uBAAuB,SAoCzD,CAAC"}
|
package/dist/handlers/index.js
CHANGED
|
@@ -1,21 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.extendRouter = void 0;
|
|
7
|
+
const express_1 = __importDefault(require("express"));
|
|
8
|
+
const create_cors_ts_1 = require("../middleware/create-cors.js");
|
|
9
|
+
const no_cache_ts_1 = require("../middleware/no-cache.js");
|
|
10
|
+
const session_ts_1 = require("../middleware/session.js");
|
|
11
|
+
const error_handling_ts_1 = require("../middleware/error-handling.js");
|
|
12
|
+
const auth0_handlers_ts_1 = require("./auth0-handlers.js");
|
|
13
|
+
const openid_handlers_ts_1 = require("./openid-handlers.js");
|
|
14
|
+
const path_1 = __importDefault(require("path"));
|
|
15
|
+
const publicDir = path_1.default.join(__dirname, "..", "views", "public");
|
|
16
|
+
const extendRouter = (config, debug = false) => (router, simulationStore) => {
|
|
11
17
|
const serviceURL = (request) => `${request.protocol}://${request.get("Host")}/`;
|
|
12
|
-
const auth0 = createAuth0Handlers(simulationStore, serviceURL, config, debug);
|
|
13
|
-
const openid = createOpenIdHandlers(serviceURL);
|
|
18
|
+
const auth0 = (0, auth0_handlers_ts_1.createAuth0Handlers)(simulationStore, serviceURL, config, debug);
|
|
19
|
+
const openid = (0, openid_handlers_ts_1.createOpenIdHandlers)(serviceURL);
|
|
14
20
|
router
|
|
15
|
-
.use(
|
|
16
|
-
.use(createSession())
|
|
17
|
-
.use(createCors())
|
|
18
|
-
.use(noCache())
|
|
21
|
+
.use(express_1.default.static(publicDir))
|
|
22
|
+
.use((0, session_ts_1.createSession)())
|
|
23
|
+
.use((0, create_cors_ts_1.createCors)())
|
|
24
|
+
.use((0, no_cache_ts_1.noCache)())
|
|
19
25
|
.get("/health", (_, response) => {
|
|
20
26
|
response.send({ status: "ok" });
|
|
21
27
|
})
|
|
@@ -31,6 +37,7 @@ export const extendRouter = (config, debug = false) => (router, simulationStore)
|
|
|
31
37
|
.get("/.well-known/jwks.json", openid["/.well-known/jwks.json"])
|
|
32
38
|
.get("/.well-known/openid-configuration", openid["/.well-known/openid-configuration"]);
|
|
33
39
|
// needs to be the last middleware added
|
|
34
|
-
router.use(defaultErrorHandler);
|
|
40
|
+
router.use(error_handling_ts_1.defaultErrorHandler);
|
|
35
41
|
};
|
|
42
|
+
exports.extendRouter = extendRouter;
|
|
36
43
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/handlers/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/handlers/index.ts"],"names":[],"mappings":";;;;;;AAAA,sDAA8D;AAE9D,iEAA0D;AAC1D,2DAAoD;AACpD,yDAAyD;AACzD,uEAAsE;AACtE,2DAA0D;AAC1D,6DAA4D;AAC5D,gDAAwB;AAGxB,MAAM,SAAS,GAAG,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;AACzD,MAAM,YAAY,GACvB,CAAC,MAA0B,EAAE,KAA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AG,CAAC,YAAY,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;SACtC,GAAG,CAAC,wBAAwB,EAAE,MAAM,CAAC,wBAAwB,CAAC,CAAC;SAC/D,GAAG,CACF,mCAAmC,EACnC,MAAM,CAAC,mCAAmC,CAAC,CAC5C,CAAC;IAEJ,wCAAwC;IACxC,MAAM,CAAC,GAAG,CAAC,uCAAmB,CAAC,CAAC;AAClC,CAAC,CAAC;AAtCS,QAAA,YAAY,gBAsCrB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { RequestHandler } from "express";
|
|
2
|
-
import type { Auth0Configuration } from "../types";
|
|
2
|
+
import type { Auth0Configuration } from "../types.ts";
|
|
3
3
|
export declare const createLoginRedirectHandler: (options: Auth0Configuration) => RequestHandler;
|
|
4
4
|
//# sourceMappingURL=login-redirect.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login-redirect.d.ts","sourceRoot":"","sources":["../../src/handlers/login-redirect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAqB,cAAc,EAAE,MAAM,SAAS,CAAC;AACjE,OAAO,KAAK,EAAE,kBAAkB,EAAe,MAAM,
|
|
1
|
+
{"version":3,"file":"login-redirect.d.ts","sourceRoot":"","sources":["../../src/handlers/login-redirect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAqB,cAAc,EAAE,MAAM,SAAS,CAAC;AACjE,OAAO,KAAK,EAAE,kBAAkB,EAAe,MAAM,aAAa,CAAC;AAGnE,eAAO,MAAM,0BAA0B,GACrC,SAAS,kBAAkB,KAC1B,cAgCA,CAAC"}
|