@spinajs/rbac-http-user 2.0.507 → 2.0.509
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/lib/cjs/2fa/otpUrl.d.ts +16 -0
- package/lib/cjs/2fa/otpUrl.d.ts.map +1 -0
- package/lib/cjs/2fa/otpUrl.js +64 -0
- package/lib/cjs/2fa/otpUrl.js.map +1 -0
- package/lib/cjs/cli/Generate2FaQrCode.d.ts +19 -0
- package/lib/cjs/cli/Generate2FaQrCode.d.ts.map +1 -0
- package/lib/cjs/cli/Generate2FaQrCode.js +57 -0
- package/lib/cjs/cli/Generate2FaQrCode.js.map +1 -0
- package/lib/cjs/index.d.ts +2 -0
- package/lib/cjs/index.d.ts.map +1 -1
- package/lib/cjs/index.js +2 -0
- package/lib/cjs/index.js.map +1 -1
- package/lib/mjs/2fa/otpUrl.d.ts +16 -0
- package/lib/mjs/2fa/otpUrl.d.ts.map +1 -0
- package/lib/mjs/2fa/otpUrl.js +28 -0
- package/lib/mjs/2fa/otpUrl.js.map +1 -0
- package/lib/mjs/cli/Generate2FaQrCode.d.ts +19 -0
- package/lib/mjs/cli/Generate2FaQrCode.d.ts.map +1 -0
- package/lib/mjs/cli/Generate2FaQrCode.js +51 -0
- package/lib/mjs/cli/Generate2FaQrCode.js.map +1 -0
- package/lib/mjs/index.d.ts +2 -0
- package/lib/mjs/index.d.ts.map +1 -1
- package/lib/mjs/index.js +2 -0
- package/lib/mjs/index.js.map +1 -1
- package/lib/tsconfig.cjs.tsbuildinfo +1 -1
- package/lib/tsconfig.mjs.tsbuildinfo +1 -1
- package/package.json +17 -15
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface IOtpUrlOptions {
|
|
2
|
+
issuer: string;
|
|
3
|
+
label: string;
|
|
4
|
+
algorithm: string;
|
|
5
|
+
digits: number;
|
|
6
|
+
period: number;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Turns a raw base32 TOTP secret into a full `otpauth://` url that
|
|
10
|
+
* authenticator apps ( eg. google authenticator ) understand. A value that is
|
|
11
|
+
* already an `otpauth://` url is passed through untouched, so callers can
|
|
12
|
+
* accept either form. Whitespace and case in the secret are normalized —
|
|
13
|
+
* secrets are often shared in `jbsw y3dp ...` form.
|
|
14
|
+
*/
|
|
15
|
+
export declare function buildOtpAuthUrl(secretOrUrl: string, options: IOtpUrlOptions): string;
|
|
16
|
+
//# sourceMappingURL=otpUrl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"otpUrl.d.ts","sourceRoot":"","sources":["../../../src/2fa/otpUrl.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,GAAG,MAAM,CAqBpF"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.buildOtpAuthUrl = buildOtpAuthUrl;
|
|
37
|
+
const OTPAuth = __importStar(require("otpauth"));
|
|
38
|
+
const exceptions_1 = require("@spinajs/exceptions");
|
|
39
|
+
/**
|
|
40
|
+
* Turns a raw base32 TOTP secret into a full `otpauth://` url that
|
|
41
|
+
* authenticator apps ( eg. google authenticator ) understand. A value that is
|
|
42
|
+
* already an `otpauth://` url is passed through untouched, so callers can
|
|
43
|
+
* accept either form. Whitespace and case in the secret are normalized —
|
|
44
|
+
* secrets are often shared in `jbsw y3dp ...` form.
|
|
45
|
+
*/
|
|
46
|
+
function buildOtpAuthUrl(secretOrUrl, options) {
|
|
47
|
+
const input = secretOrUrl.trim();
|
|
48
|
+
if (!input) {
|
|
49
|
+
throw new exceptions_1.InvalidArgument('2fa secret or otpauth url is empty');
|
|
50
|
+
}
|
|
51
|
+
if (input.toLowerCase().startsWith('otpauth://')) {
|
|
52
|
+
return input;
|
|
53
|
+
}
|
|
54
|
+
const secret = input.replace(/\s+/g, '').toUpperCase();
|
|
55
|
+
return new OTPAuth.TOTP({
|
|
56
|
+
issuer: options.issuer,
|
|
57
|
+
label: options.label,
|
|
58
|
+
algorithm: options.algorithm,
|
|
59
|
+
digits: options.digits,
|
|
60
|
+
period: options.period,
|
|
61
|
+
secret: OTPAuth.Secret.fromBase32(secret),
|
|
62
|
+
}).toString();
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=otpUrl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"otpUrl.js","sourceRoot":"","sources":["../../../src/2fa/otpUrl.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAY,OAAO,oCAAgB;AACnC,oDAAsD;AAUtD;;;;;;GAMG;AACH,yBAAgC,WAAmB,EAAE,OAAuB;IAC1E,MAAM,KAAK,GAAG,WAAW,CAAC,IAAI,EAAE,CAAC;IAEjC,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,4BAAe,CAAC,oCAAoC,CAAC,CAAC;IAClE,CAAC;IAED,IAAI,KAAK,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;QACjD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;IAEvD,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;QACtB,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC;KAC1C,CAAC,CAAC,QAAQ,EAAE,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Log } from '@spinajs/log';
|
|
2
|
+
import { CliCommand } from '@spinajs/cli';
|
|
3
|
+
interface IGenerate2FaQrOptions {
|
|
4
|
+
label: string;
|
|
5
|
+
issuer?: string;
|
|
6
|
+
output?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare class Generate2FaQrCode extends CliCommand {
|
|
9
|
+
protected Log: Log;
|
|
10
|
+
protected OtpConfig: {
|
|
11
|
+
issuer: string;
|
|
12
|
+
algorithm: string;
|
|
13
|
+
digits: number;
|
|
14
|
+
period: number;
|
|
15
|
+
};
|
|
16
|
+
execute(secretOrUrl: string, options: IGenerate2FaQrOptions): Promise<void>;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=Generate2FaQrCode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Generate2FaQrCode.d.ts","sourceRoot":"","sources":["../../../src/cli/Generate2FaQrCode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAU,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAY,UAAU,EAAmB,MAAM,cAAc,CAAC;AAMrE,UAAU,qBAAqB;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,qBAKa,iBAAkB,SAAQ,UAAU;IAE/C,SAAS,CAAC,GAAG,EAAE,GAAG,CAAC;IAGnB,SAAS,CAAC,SAAS,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAE9E,OAAO,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAoBvF;CACF"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.Generate2FaQrCode = void 0;
|
|
16
|
+
const log_1 = require("@spinajs/log");
|
|
17
|
+
const cli_1 = require("@spinajs/cli");
|
|
18
|
+
const configuration_1 = require("@spinajs/configuration");
|
|
19
|
+
const qrcode_1 = __importDefault(require("qrcode"));
|
|
20
|
+
const otpUrl_js_1 = require("../2fa/otpUrl.js");
|
|
21
|
+
let Generate2FaQrCode = class Generate2FaQrCode extends cli_1.CliCommand {
|
|
22
|
+
async execute(secretOrUrl, options) {
|
|
23
|
+
const url = (0, otpUrl_js_1.buildOtpAuthUrl)(secretOrUrl, {
|
|
24
|
+
issuer: options.issuer ?? this.OtpConfig.issuer,
|
|
25
|
+
label: options.label,
|
|
26
|
+
algorithm: this.OtpConfig.algorithm,
|
|
27
|
+
digits: this.OtpConfig.digits,
|
|
28
|
+
period: this.OtpConfig.period,
|
|
29
|
+
});
|
|
30
|
+
const qr = await qrcode_1.default.toString(url, { type: 'terminal', small: true });
|
|
31
|
+
// straight to stdout - logger prefixes would break QR module alignment
|
|
32
|
+
// and make the code unscannable
|
|
33
|
+
console.log(qr);
|
|
34
|
+
console.log(url);
|
|
35
|
+
if (options.output) {
|
|
36
|
+
await qrcode_1.default.toFile(options.output, url, { type: 'png' });
|
|
37
|
+
this.Log.success(`QR code written to ${options.output}`);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
exports.Generate2FaQrCode = Generate2FaQrCode;
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, log_1.Logger)('rbac-http-user'),
|
|
44
|
+
__metadata("design:type", log_1.Log)
|
|
45
|
+
], Generate2FaQrCode.prototype, "Log", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, configuration_1.Config)('rbac.otpauth'),
|
|
48
|
+
__metadata("design:type", Object)
|
|
49
|
+
], Generate2FaQrCode.prototype, "OtpConfig", void 0);
|
|
50
|
+
exports.Generate2FaQrCode = Generate2FaQrCode = __decorate([
|
|
51
|
+
(0, cli_1.Command)('rbac:2fa-qr', 'Prints QR code for given 2fa TOTP secret or otpauth url ( scannable by eg. google authenticator )'),
|
|
52
|
+
(0, cli_1.Argument)('secretOrUrl', true, 'base32 TOTP secret or full otpauth:// url'),
|
|
53
|
+
(0, cli_1.Option)('-l, --label <label>', false, 'account label shown in authenticator app', 'user'),
|
|
54
|
+
(0, cli_1.Option)('-i, --issuer <issuer>', false, 'issuer shown in authenticator app, defaults to rbac.otpauth.issuer config'),
|
|
55
|
+
(0, cli_1.Option)('-o, --output <file>', false, 'also write QR code to png file')
|
|
56
|
+
], Generate2FaQrCode);
|
|
57
|
+
//# sourceMappingURL=Generate2FaQrCode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Generate2FaQrCode.js","sourceRoot":"","sources":["../../../src/cli/Generate2FaQrCode.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,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;IAC3H,IAAA,cAAQ,EAAC,aAAa,EAAE,IAAI,EAAE,2CAA2C,CAAC;IAC1E,IAAA,YAAM,EAAC,qBAAqB,EAAE,KAAK,EAAE,0CAA0C,EAAE,MAAM,CAAC;IACxF,IAAA,YAAM,EAAC,uBAAuB,EAAE,KAAK,EAAE,2EAA2E,CAAC;IACnH,IAAA,YAAM,EAAC,qBAAqB,EAAE,KAAK,EAAE,gCAAgC,CAAC;GAC1D,iBAAiB,CA4B7B"}
|
package/lib/cjs/index.d.ts
CHANGED
|
@@ -12,7 +12,9 @@ export * from "./controllers/TwoFactorAuthUserController.js";
|
|
|
12
12
|
export * from "./controllers/PasswordResetController.js";
|
|
13
13
|
export * from "./controllers/SessionsController.js";
|
|
14
14
|
export * from "./cli/EnableUser2Fa.js";
|
|
15
|
+
export * from "./cli/Generate2FaQrCode.js";
|
|
15
16
|
export * from "./2fa/Default2FaToken.js";
|
|
17
|
+
export * from "./2fa/otpUrl.js";
|
|
16
18
|
export * from './actions/2fa.js';
|
|
17
19
|
export * from './services/SessionCookies.js';
|
|
18
20
|
export * from './services/grants.js';
|
package/lib/cjs/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAc,MAAM,aAAa,CAAC;AAIvD,cAAc,kCAAkC,CAAC;AACjD,cAAc,uCAAuC,CAAC;AACtD,cAAc,0CAA0C,CAAC;AACzD,cAAc,iCAAiC,CAAC;AAEhD,cAAc,aAAa,CAAC;AAC5B,cAAc,0CAA0C,CAAC;AACzD,cAAc,oCAAoC,CAAC;AACnD,cAAc,yCAAyC,CAAC;AACxD,cAAc,0CAA0C,CAAC;AACzD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,0CAA0C,CAAC;AACzD,cAAc,qCAAqC,CAAC;AAEpD,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAc,MAAM,aAAa,CAAC;AAIvD,cAAc,kCAAkC,CAAC;AACjD,cAAc,uCAAuC,CAAC;AACtD,cAAc,0CAA0C,CAAC;AACzD,cAAc,iCAAiC,CAAC;AAEhD,cAAc,aAAa,CAAC;AAC5B,cAAc,0CAA0C,CAAC;AACzD,cAAc,oCAAoC,CAAC;AACnD,cAAc,yCAAyC,CAAC;AACxD,cAAc,0CAA0C,CAAC;AACzD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,0CAA0C,CAAC;AACzD,cAAc,qCAAqC,CAAC;AAEpD,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC;AAEhC,cAAc,kBAAkB,CAAC;AAEjC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sBAAsB,CAAC;AACrC,cAAc,oCAAoC,CAAC;AACnD,cAAc,mCAAmC,CAAC;AAElD,cAAc,yBAAyB,CAAC;AAIxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AAEzC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AAGvC,qBACa,wBAAyB,SAAQ,YAAY;IAC/C,SAAS,IAAI,IAAI,CAMvB;CACJ"}
|
package/lib/cjs/index.js
CHANGED
|
@@ -37,7 +37,9 @@ __exportStar(require("./controllers/TwoFactorAuthUserController.js"), exports);
|
|
|
37
37
|
__exportStar(require("./controllers/PasswordResetController.js"), exports);
|
|
38
38
|
__exportStar(require("./controllers/SessionsController.js"), exports);
|
|
39
39
|
__exportStar(require("./cli/EnableUser2Fa.js"), exports);
|
|
40
|
+
__exportStar(require("./cli/Generate2FaQrCode.js"), exports);
|
|
40
41
|
__exportStar(require("./2fa/Default2FaToken.js"), exports);
|
|
42
|
+
__exportStar(require("./2fa/otpUrl.js"), exports);
|
|
41
43
|
__exportStar(require("./actions/2fa.js"), exports);
|
|
42
44
|
__exportStar(require("./services/SessionCookies.js"), exports);
|
|
43
45
|
__exportStar(require("./services/grants.js"), exports);
|
package/lib/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,oCAAuD;AACvD,wCAAiD;AACjD,iEAAkE;AAElE,mEAAiD;AACjD,wEAAsD;AACtD,2EAAyD;AACzD,kEAAgD;AAEhD,8CAA4B;AAC5B,2EAAyD;AACzD,qEAAmD;AACnD,0EAAwD;AACxD,2EAAyD;AACzD,+EAA6D;AAC7D,2EAAyD;AACzD,sEAAoD;AAEpD,yDAAuC;AACvC,2DAAyC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,oCAAuD;AACvD,wCAAiD;AACjD,iEAAkE;AAElE,mEAAiD;AACjD,wEAAsD;AACtD,2EAAyD;AACzD,kEAAgD;AAEhD,8CAA4B;AAC5B,2EAAyD;AACzD,qEAAmD;AACnD,0EAAwD;AACxD,2EAAyD;AACzD,+EAA6D;AAC7D,2EAAyD;AACzD,sEAAoD;AAEpD,yDAAuC;AACvC,6DAA2C;AAC3C,2DAAyC;AACzC,kDAAgC;AAEhC,mDAAiC;AAEjC,+DAA6C;AAC7C,uDAAqC;AACrC,qEAAmD;AACnD,oEAAkD;AAElD,0DAAwC;AAExC,6EAA6E;AAC7E,8DAA8D;AAC9D,6DAA2C;AAC3C,8DAA4C;AAC5C,4DAA0C;AAC1C,2DAAyC;AAEzC,gEAA8C;AAC9C,2DAAyC;AACzC,wDAAsC;AACtC,wDAAsC;AACtC,8DAA4C;AAC5C,0DAAwC;AACxC,qDAAmC;AACnC,yDAAuC;AAIhC,IAAM,wBAAwB,GAA9B,MAAM,wBAAyB,SAAQ,iBAAY;IAC/C,SAAS;QACZ,uBAAgB,CAAC,WAAW,GAAG;YAC3B,GAAG,uBAAgB,CAAC,WAAW;YAC/B,2CAAsB,CAAC,KAAK;YAC5B,2CAAsB,CAAC,GAAG;SAC7B,CAAA;IACL,CAAC;CACJ,CAAA;;mCARY,wBAAwB;IADpC,IAAA,eAAU,EAAC,iBAAY,CAAC;GACZ,wBAAwB,CAQpC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface IOtpUrlOptions {
|
|
2
|
+
issuer: string;
|
|
3
|
+
label: string;
|
|
4
|
+
algorithm: string;
|
|
5
|
+
digits: number;
|
|
6
|
+
period: number;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Turns a raw base32 TOTP secret into a full `otpauth://` url that
|
|
10
|
+
* authenticator apps ( eg. google authenticator ) understand. A value that is
|
|
11
|
+
* already an `otpauth://` url is passed through untouched, so callers can
|
|
12
|
+
* accept either form. Whitespace and case in the secret are normalized —
|
|
13
|
+
* secrets are often shared in `jbsw y3dp ...` form.
|
|
14
|
+
*/
|
|
15
|
+
export declare function buildOtpAuthUrl(secretOrUrl: string, options: IOtpUrlOptions): string;
|
|
16
|
+
//# sourceMappingURL=otpUrl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"otpUrl.d.ts","sourceRoot":"","sources":["../../../src/2fa/otpUrl.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,GAAG,MAAM,CAqBpF"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as OTPAuth from 'otpauth';
|
|
2
|
+
import { InvalidArgument } from '@spinajs/exceptions';
|
|
3
|
+
/**
|
|
4
|
+
* Turns a raw base32 TOTP secret into a full `otpauth://` url that
|
|
5
|
+
* authenticator apps ( eg. google authenticator ) understand. A value that is
|
|
6
|
+
* already an `otpauth://` url is passed through untouched, so callers can
|
|
7
|
+
* accept either form. Whitespace and case in the secret are normalized —
|
|
8
|
+
* secrets are often shared in `jbsw y3dp ...` form.
|
|
9
|
+
*/
|
|
10
|
+
export function buildOtpAuthUrl(secretOrUrl, options) {
|
|
11
|
+
const input = secretOrUrl.trim();
|
|
12
|
+
if (!input) {
|
|
13
|
+
throw new InvalidArgument('2fa secret or otpauth url is empty');
|
|
14
|
+
}
|
|
15
|
+
if (input.toLowerCase().startsWith('otpauth://')) {
|
|
16
|
+
return input;
|
|
17
|
+
}
|
|
18
|
+
const secret = input.replace(/\s+/g, '').toUpperCase();
|
|
19
|
+
return new OTPAuth.TOTP({
|
|
20
|
+
issuer: options.issuer,
|
|
21
|
+
label: options.label,
|
|
22
|
+
algorithm: options.algorithm,
|
|
23
|
+
digits: options.digits,
|
|
24
|
+
period: options.period,
|
|
25
|
+
secret: OTPAuth.Secret.fromBase32(secret),
|
|
26
|
+
}).toString();
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=otpUrl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"otpUrl.js","sourceRoot":"","sources":["../../../src/2fa/otpUrl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAUtD;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAAC,WAAmB,EAAE,OAAuB;IAC1E,MAAM,KAAK,GAAG,WAAW,CAAC,IAAI,EAAE,CAAC;IAEjC,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,eAAe,CAAC,oCAAoC,CAAC,CAAC;IAClE,CAAC;IAED,IAAI,KAAK,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;QACjD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;IAEvD,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;QACtB,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC;KAC1C,CAAC,CAAC,QAAQ,EAAE,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Log } from '@spinajs/log';
|
|
2
|
+
import { CliCommand } from '@spinajs/cli';
|
|
3
|
+
interface IGenerate2FaQrOptions {
|
|
4
|
+
label: string;
|
|
5
|
+
issuer?: string;
|
|
6
|
+
output?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare class Generate2FaQrCode extends CliCommand {
|
|
9
|
+
protected Log: Log;
|
|
10
|
+
protected OtpConfig: {
|
|
11
|
+
issuer: string;
|
|
12
|
+
algorithm: string;
|
|
13
|
+
digits: number;
|
|
14
|
+
period: number;
|
|
15
|
+
};
|
|
16
|
+
execute(secretOrUrl: string, options: IGenerate2FaQrOptions): Promise<void>;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=Generate2FaQrCode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Generate2FaQrCode.d.ts","sourceRoot":"","sources":["../../../src/cli/Generate2FaQrCode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAU,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAY,UAAU,EAAmB,MAAM,cAAc,CAAC;AAMrE,UAAU,qBAAqB;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,qBAKa,iBAAkB,SAAQ,UAAU;IAE/C,SAAS,CAAC,GAAG,EAAE,GAAG,CAAC;IAGnB,SAAS,CAAC,SAAS,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAE9E,OAAO,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAoBvF;CACF"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { Log, Logger } from '@spinajs/log';
|
|
11
|
+
import { Argument, CliCommand, Command, Option } from '@spinajs/cli';
|
|
12
|
+
import { Config } from '@spinajs/configuration';
|
|
13
|
+
import QRCode from 'qrcode';
|
|
14
|
+
import { buildOtpAuthUrl } from '../2fa/otpUrl.js';
|
|
15
|
+
let Generate2FaQrCode = class Generate2FaQrCode extends CliCommand {
|
|
16
|
+
async execute(secretOrUrl, options) {
|
|
17
|
+
const url = buildOtpAuthUrl(secretOrUrl, {
|
|
18
|
+
issuer: options.issuer ?? this.OtpConfig.issuer,
|
|
19
|
+
label: options.label,
|
|
20
|
+
algorithm: this.OtpConfig.algorithm,
|
|
21
|
+
digits: this.OtpConfig.digits,
|
|
22
|
+
period: this.OtpConfig.period,
|
|
23
|
+
});
|
|
24
|
+
const qr = await QRCode.toString(url, { type: 'terminal', small: true });
|
|
25
|
+
// straight to stdout - logger prefixes would break QR module alignment
|
|
26
|
+
// and make the code unscannable
|
|
27
|
+
console.log(qr);
|
|
28
|
+
console.log(url);
|
|
29
|
+
if (options.output) {
|
|
30
|
+
await QRCode.toFile(options.output, url, { type: 'png' });
|
|
31
|
+
this.Log.success(`QR code written to ${options.output}`);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
__decorate([
|
|
36
|
+
Logger('rbac-http-user'),
|
|
37
|
+
__metadata("design:type", Log)
|
|
38
|
+
], Generate2FaQrCode.prototype, "Log", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
Config('rbac.otpauth'),
|
|
41
|
+
__metadata("design:type", Object)
|
|
42
|
+
], Generate2FaQrCode.prototype, "OtpConfig", void 0);
|
|
43
|
+
Generate2FaQrCode = __decorate([
|
|
44
|
+
Command('rbac:2fa-qr', 'Prints QR code for given 2fa TOTP secret or otpauth url ( scannable by eg. google authenticator )'),
|
|
45
|
+
Argument('secretOrUrl', true, 'base32 TOTP secret or full otpauth:// url'),
|
|
46
|
+
Option('-l, --label <label>', false, 'account label shown in authenticator app', 'user'),
|
|
47
|
+
Option('-i, --issuer <issuer>', false, 'issuer shown in authenticator app, defaults to rbac.otpauth.issuer config'),
|
|
48
|
+
Option('-o, --output <file>', false, 'also write QR code to png file')
|
|
49
|
+
], Generate2FaQrCode);
|
|
50
|
+
export { Generate2FaQrCode };
|
|
51
|
+
//# sourceMappingURL=Generate2FaQrCode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Generate2FaQrCode.js","sourceRoot":"","sources":["../../../src/cli/Generate2FaQrCode.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAa5C,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,UAAU;IAOxC,KAAK,CAAC,OAAO,CAAC,WAAmB,EAAE,OAA8B;QACtE,MAAM,GAAG,GAAG,eAAe,CAAC,WAAW,EAAE;YACvC,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM;YAC/C,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS;YACnC,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM;YAC7B,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM;SAC9B,CAAC,CAAC;QAEH,MAAM,EAAE,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QAEzE,uEAAuE;QACvE,gCAAgC;QAChC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAChB,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAEjB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;YACnB,MAAM,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;YAC1D,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,sBAAsB,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;QAC3D,CAAC;IACH,CAAC;CACF,CAAA;AA1BW;IADT,MAAM,CAAC,gBAAgB,CAAC;8BACV,GAAG;8CAAC;AAGT;IADT,MAAM,CAAC,cAAc,CAAC;;oDACoE;AALhF,iBAAiB;IAL7B,OAAO,CAAC,aAAa,EAAE,mGAAmG,CAAC;IAC3H,QAAQ,CAAC,aAAa,EAAE,IAAI,EAAE,2CAA2C,CAAC;IAC1E,MAAM,CAAC,qBAAqB,EAAE,KAAK,EAAE,0CAA0C,EAAE,MAAM,CAAC;IACxF,MAAM,CAAC,uBAAuB,EAAE,KAAK,EAAE,2EAA2E,CAAC;IACnH,MAAM,CAAC,qBAAqB,EAAE,KAAK,EAAE,gCAAgC,CAAC;GAC1D,iBAAiB,CA4B7B"}
|
package/lib/mjs/index.d.ts
CHANGED
|
@@ -12,7 +12,9 @@ export * from "./controllers/TwoFactorAuthUserController.js";
|
|
|
12
12
|
export * from "./controllers/PasswordResetController.js";
|
|
13
13
|
export * from "./controllers/SessionsController.js";
|
|
14
14
|
export * from "./cli/EnableUser2Fa.js";
|
|
15
|
+
export * from "./cli/Generate2FaQrCode.js";
|
|
15
16
|
export * from "./2fa/Default2FaToken.js";
|
|
17
|
+
export * from "./2fa/otpUrl.js";
|
|
16
18
|
export * from './actions/2fa.js';
|
|
17
19
|
export * from './services/SessionCookies.js';
|
|
18
20
|
export * from './services/grants.js';
|
package/lib/mjs/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAc,MAAM,aAAa,CAAC;AAIvD,cAAc,kCAAkC,CAAC;AACjD,cAAc,uCAAuC,CAAC;AACtD,cAAc,0CAA0C,CAAC;AACzD,cAAc,iCAAiC,CAAC;AAEhD,cAAc,aAAa,CAAC;AAC5B,cAAc,0CAA0C,CAAC;AACzD,cAAc,oCAAoC,CAAC;AACnD,cAAc,yCAAyC,CAAC;AACxD,cAAc,0CAA0C,CAAC;AACzD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,0CAA0C,CAAC;AACzD,cAAc,qCAAqC,CAAC;AAEpD,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAc,MAAM,aAAa,CAAC;AAIvD,cAAc,kCAAkC,CAAC;AACjD,cAAc,uCAAuC,CAAC;AACtD,cAAc,0CAA0C,CAAC;AACzD,cAAc,iCAAiC,CAAC;AAEhD,cAAc,aAAa,CAAC;AAC5B,cAAc,0CAA0C,CAAC;AACzD,cAAc,oCAAoC,CAAC;AACnD,cAAc,yCAAyC,CAAC;AACxD,cAAc,0CAA0C,CAAC;AACzD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,0CAA0C,CAAC;AACzD,cAAc,qCAAqC,CAAC;AAEpD,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC;AAEhC,cAAc,kBAAkB,CAAC;AAEjC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sBAAsB,CAAC;AACrC,cAAc,oCAAoC,CAAC;AACnD,cAAc,mCAAmC,CAAC;AAElD,cAAc,yBAAyB,CAAC;AAIxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AAEzC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AAGvC,qBACa,wBAAyB,SAAQ,YAAY;IAC/C,SAAS,IAAI,IAAI,CAMvB;CACJ"}
|
package/lib/mjs/index.js
CHANGED
|
@@ -20,7 +20,9 @@ export * from "./controllers/TwoFactorAuthUserController.js";
|
|
|
20
20
|
export * from "./controllers/PasswordResetController.js";
|
|
21
21
|
export * from "./controllers/SessionsController.js";
|
|
22
22
|
export * from "./cli/EnableUser2Fa.js";
|
|
23
|
+
export * from "./cli/Generate2FaQrCode.js";
|
|
23
24
|
export * from "./2fa/Default2FaToken.js";
|
|
25
|
+
export * from "./2fa/otpUrl.js";
|
|
24
26
|
export * from './actions/2fa.js';
|
|
25
27
|
export * from './services/SessionCookies.js';
|
|
26
28
|
export * from './services/grants.js';
|
package/lib/mjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,cAAc,kCAAkC,CAAC;AACjD,cAAc,uCAAuC,CAAC;AACtD,cAAc,0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