@remnawave/backend-contract 2.2.10 → 2.2.12
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/build/backend/api/controllers/auth.d.ts +6 -0
- package/build/backend/api/controllers/auth.d.ts.map +1 -1
- package/build/backend/api/controllers/auth.js +6 -0
- package/build/backend/api/routes.d.ts +6 -0
- package/build/backend/api/routes.d.ts.map +1 -1
- package/build/backend/api/routes.js +6 -0
- package/build/backend/commands/auth/index.d.ts +1 -0
- package/build/backend/commands/auth/index.d.ts.map +1 -1
- package/build/backend/commands/auth/index.js +1 -0
- package/build/backend/commands/auth/passkey/get-authentication-options.command.d.ts +16 -0
- package/build/backend/commands/auth/passkey/get-authentication-options.command.d.ts.map +1 -0
- package/build/backend/commands/auth/passkey/get-authentication-options.command.js +15 -0
- package/build/backend/commands/auth/passkey/get-registration-options.command.d.ts +16 -0
- package/build/backend/commands/auth/passkey/get-registration-options.command.d.ts.map +1 -0
- package/build/backend/commands/auth/passkey/get-registration-options.command.js +15 -0
- package/build/backend/commands/auth/passkey/index.d.ts +5 -0
- package/build/backend/commands/auth/passkey/index.d.ts.map +1 -0
- package/build/backend/commands/auth/passkey/index.js +20 -0
- package/build/backend/commands/auth/passkey/verify-authentication.command.d.ts +34 -0
- package/build/backend/commands/auth/passkey/verify-authentication.command.d.ts.map +1 -0
- package/build/backend/commands/auth/passkey/verify-authentication.command.js +20 -0
- package/build/backend/commands/auth/passkey/verify-registration.command.d.ts +39 -0
- package/build/backend/commands/auth/passkey/verify-registration.command.d.ts.map +1 -0
- package/build/backend/commands/auth/passkey/verify-registration.command.js +21 -0
- package/build/backend/constants/cache-keys/cache-keys.constants.d.ts +2 -0
- package/build/backend/constants/cache-keys/cache-keys.constants.d.ts.map +1 -1
- package/build/backend/constants/cache-keys/cache-keys.constants.js +2 -0
- package/build/backend/constants/errors/errors.d.ts +5 -0
- package/build/backend/constants/errors/errors.d.ts.map +1 -1
- package/build/backend/constants/errors/errors.js +5 -0
- package/build/backend/constants/events/events.d.ts +7 -0
- package/build/backend/constants/events/events.d.ts.map +1 -1
- package/build/backend/constants/events/events.js +7 -0
- package/build/frontend/api/controllers/auth.js +6 -0
- package/build/frontend/api/routes.js +6 -0
- package/build/frontend/commands/auth/index.js +1 -0
- package/build/frontend/commands/auth/passkey/get-authentication-options.command.js +15 -0
- package/build/frontend/commands/auth/passkey/get-registration-options.command.js +15 -0
- package/build/frontend/commands/auth/passkey/index.js +20 -0
- package/build/frontend/commands/auth/passkey/verify-authentication.command.js +20 -0
- package/build/frontend/commands/auth/passkey/verify-registration.command.js +21 -0
- package/build/frontend/constants/cache-keys/cache-keys.constants.js +2 -0
- package/build/frontend/constants/errors/errors.js +5 -0
- package/build/frontend/constants/events/events.js +7 -0
- package/package.json +4 -1
|
@@ -8,5 +8,11 @@ export declare const AUTH_ROUTES: {
|
|
|
8
8
|
readonly AUTHORIZE: "oauth2/authorize";
|
|
9
9
|
readonly CALLBACK: "oauth2/callback";
|
|
10
10
|
};
|
|
11
|
+
readonly PASSKEY: {
|
|
12
|
+
readonly GET_REGISTRATION_OPTIONS: "passkey/registration/options";
|
|
13
|
+
readonly VERIFY_REGISTRATION: "passkey/registration/verify";
|
|
14
|
+
readonly GET_AUTHENTICATION_OPTIONS: "passkey/authentication/options";
|
|
15
|
+
readonly VERIFY_AUTHENTICATION: "passkey/authentication/verify";
|
|
16
|
+
};
|
|
11
17
|
};
|
|
12
18
|
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../../api/controllers/auth.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,EAAG,MAAe,CAAC;AAE/C,eAAO,MAAM,WAAW
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../../api/controllers/auth.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,EAAG,MAAe,CAAC;AAE/C,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;CAgBd,CAAC"}
|
|
@@ -11,4 +11,10 @@ exports.AUTH_ROUTES = {
|
|
|
11
11
|
AUTHORIZE: 'oauth2/authorize',
|
|
12
12
|
CALLBACK: 'oauth2/callback',
|
|
13
13
|
},
|
|
14
|
+
PASSKEY: {
|
|
15
|
+
GET_REGISTRATION_OPTIONS: 'passkey/registration/options', // get
|
|
16
|
+
VERIFY_REGISTRATION: 'passkey/registration/verify', // post
|
|
17
|
+
GET_AUTHENTICATION_OPTIONS: 'passkey/authentication/options', // get
|
|
18
|
+
VERIFY_AUTHENTICATION: 'passkey/authentication/verify', // post
|
|
19
|
+
},
|
|
14
20
|
};
|
|
@@ -12,6 +12,12 @@ export declare const REST_API: {
|
|
|
12
12
|
readonly AUTHORIZE: "/api/auth/oauth2/authorize";
|
|
13
13
|
readonly CALLBACK: "/api/auth/oauth2/callback";
|
|
14
14
|
};
|
|
15
|
+
readonly PASSKEY: {
|
|
16
|
+
readonly GET_REGISTRATION_OPTIONS: "/api/auth/passkey/registration/options";
|
|
17
|
+
readonly VERIFY_REGISTRATION: "/api/auth/passkey/registration/verify";
|
|
18
|
+
readonly GET_AUTHENTICATION_OPTIONS: "/api/auth/passkey/authentication/options";
|
|
19
|
+
readonly VERIFY_AUTHENTICATION: "/api/auth/passkey/authentication/verify";
|
|
20
|
+
};
|
|
15
21
|
};
|
|
16
22
|
readonly API_TOKENS: {
|
|
17
23
|
readonly CREATE: "/api/tokens/";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../api/routes.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,EAAG,MAAe,CAAC;AACpC,eAAO,MAAM,YAAY,EAAG,UAAmB,CAAC;AAChD,eAAO,MAAM,WAAW,EAAG,SAAkB,CAAC;AAC9C,eAAO,MAAM,cAAc,EAAG,SAAkB,CAAC;AAEjD,eAAO,MAAM,QAAQ
|
|
1
|
+
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../api/routes.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,EAAG,MAAe,CAAC;AACpC,eAAO,MAAM,YAAY,EAAG,UAAmB,CAAC;AAChD,eAAO,MAAM,WAAW,EAAG,SAAkB,CAAC;AAC9C,eAAO,MAAM,cAAc,EAAG,SAAkB,CAAC;AAEjD,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;gCAoBE,MAAM;;;;;;;;;qCAYD,MAAM;;gCAGX,MAAM;;oCAIF,MAAM;qCAIL,MAAM;qCAIN,MAAM;;;;;;iDAUM,MAAM;;;;;;;;gCAWvB,MAAM;qCAGD,MAAM;0CAED,MAAM;sDAEM,MAAM;;qCAMvB,MAAM;oCAIP,MAAM;2CAIC,MAAM;iDAIA,MAAM;;;6CAOV,MAAM;0CAIT,MAAM;2DAIW,MAAM;+CAIlB,MAAM;oCAIjB,MAAM;gCAIV,MAAM;;;;;;;;;;;;;;;gDAmBU,MAAM;;;;;;;kCAWpB,MAAM;0CAEE,MAAM;uCAET,MAAM;;;;;;qCASR,MAAM;gCAEX,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6BAmCT,MAAM;;gCAKH,MAAM;;;;;;;;;;;mDAca,MAAM;;;;;;;;0CAWf,MAAM;kCAId,MAAM;6CAIK,MAAM;iDAIF,MAAM;;;;;;;qCAUlB,MAAM;gCAIX,MAAM;sDAIgB,MAAM;;;;;;;qCAUvB,MAAM;gCAIX,MAAM;0CAII,MAAM;;uCAKT,MAAM;0CAEH,MAAM;;;;;;;yCASP,MAAM;8CAED,MAAM;;;;6CAMP,MAAM;;;gDAKH,MAAM;;;;;;;;;;;;;;;;qCAiBjB,MAAM;gCAIX,MAAM;;uCAKC,MAAM;0CAEH,MAAM;;;CAI7B,CAAC"}
|
|
@@ -49,6 +49,12 @@ exports.REST_API = {
|
|
|
49
49
|
AUTHORIZE: `${exports.ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.OAUTH2.AUTHORIZE}`,
|
|
50
50
|
CALLBACK: `${exports.ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.OAUTH2.CALLBACK}`,
|
|
51
51
|
},
|
|
52
|
+
PASSKEY: {
|
|
53
|
+
GET_REGISTRATION_OPTIONS: `${exports.ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.PASSKEY.GET_REGISTRATION_OPTIONS}`,
|
|
54
|
+
VERIFY_REGISTRATION: `${exports.ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.PASSKEY.VERIFY_REGISTRATION}`,
|
|
55
|
+
GET_AUTHENTICATION_OPTIONS: `${exports.ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.PASSKEY.GET_AUTHENTICATION_OPTIONS}`,
|
|
56
|
+
VERIFY_AUTHENTICATION: `${exports.ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.PASSKEY.VERIFY_AUTHENTICATION}`,
|
|
57
|
+
},
|
|
52
58
|
},
|
|
53
59
|
API_TOKENS: {
|
|
54
60
|
CREATE: `${exports.ROOT}/${CONTROLLERS.API_TOKENS_CONTROLLER}/${CONTROLLERS.API_TOKENS_ROUTES.CREATE}`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commands/auth/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commands/auth/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC"}
|
|
@@ -17,4 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./get-status.command"), exports);
|
|
18
18
|
__exportStar(require("./login.command"), exports);
|
|
19
19
|
__exportStar(require("./oauth2"), exports);
|
|
20
|
+
__exportStar(require("./passkey"), exports);
|
|
20
21
|
__exportStar(require("./register.command"), exports);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type PublicKeyCredentialRequestOptionsJSON } from '@simplewebauthn/server';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export declare namespace GetPasskeyAuthenticationOptionsCommand {
|
|
4
|
+
const url: "/api/auth/passkey/authentication/options";
|
|
5
|
+
const TSQ_url: "/api/auth/passkey/authentication/options";
|
|
6
|
+
const endpointDetails: import("../../../constants").EndpointDetails;
|
|
7
|
+
const ResponseSchema: z.ZodObject<{
|
|
8
|
+
response: z.ZodEffects<z.ZodUnknown, PublicKeyCredentialRequestOptionsJSON, unknown>;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
response: PublicKeyCredentialRequestOptionsJSON;
|
|
11
|
+
}, {
|
|
12
|
+
response?: unknown;
|
|
13
|
+
}>;
|
|
14
|
+
type Response = z.infer<typeof ResponseSchema>;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=get-authentication-options.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-authentication-options.command.d.ts","sourceRoot":"","sources":["../../../../../commands/auth/passkey/get-authentication-options.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,qCAAqC,EAAE,MAAM,wBAAwB,CAAC;AACpF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,sCAAsC,CAAC;IAC7C,MAAM,GAAG,4CAAmD,CAAC;IAC7D,MAAM,OAAO,4CAAM,CAAC;IAEpB,MAAM,eAAe,8CAI3B,CAAC;IAEK,MAAM,cAAc;;;;;;MAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetPasskeyAuthenticationOptionsCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../../../constants");
|
|
6
|
+
const api_1 = require("../../../api");
|
|
7
|
+
var GetPasskeyAuthenticationOptionsCommand;
|
|
8
|
+
(function (GetPasskeyAuthenticationOptionsCommand) {
|
|
9
|
+
GetPasskeyAuthenticationOptionsCommand.url = api_1.REST_API.AUTH.PASSKEY.GET_AUTHENTICATION_OPTIONS;
|
|
10
|
+
GetPasskeyAuthenticationOptionsCommand.TSQ_url = GetPasskeyAuthenticationOptionsCommand.url;
|
|
11
|
+
GetPasskeyAuthenticationOptionsCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.AUTH_ROUTES.PASSKEY.GET_AUTHENTICATION_OPTIONS, 'get', 'Get the authentication options for passkey');
|
|
12
|
+
GetPasskeyAuthenticationOptionsCommand.ResponseSchema = zod_1.z.object({
|
|
13
|
+
response: zod_1.z.unknown().transform((val) => val),
|
|
14
|
+
});
|
|
15
|
+
})(GetPasskeyAuthenticationOptionsCommand || (exports.GetPasskeyAuthenticationOptionsCommand = GetPasskeyAuthenticationOptionsCommand = {}));
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type PublicKeyCredentialCreationOptionsJSON } from '@simplewebauthn/server';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export declare namespace GetPasskeyRegistrationOptionsCommand {
|
|
4
|
+
const url: "/api/auth/passkey/registration/options";
|
|
5
|
+
const TSQ_url: "/api/auth/passkey/registration/options";
|
|
6
|
+
const endpointDetails: import("../../../constants").EndpointDetails;
|
|
7
|
+
const ResponseSchema: z.ZodObject<{
|
|
8
|
+
response: z.ZodEffects<z.ZodUnknown, PublicKeyCredentialCreationOptionsJSON, unknown>;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
response: PublicKeyCredentialCreationOptionsJSON;
|
|
11
|
+
}, {
|
|
12
|
+
response?: unknown;
|
|
13
|
+
}>;
|
|
14
|
+
type Response = z.infer<typeof ResponseSchema>;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=get-registration-options.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-registration-options.command.d.ts","sourceRoot":"","sources":["../../../../../commands/auth/passkey/get-registration-options.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,sCAAsC,EAAE,MAAM,wBAAwB,CAAC;AACrF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,oCAAoC,CAAC;IAC3C,MAAM,GAAG,0CAAiD,CAAC;IAC3D,MAAM,OAAO,0CAAM,CAAC;IAEpB,MAAM,eAAe,8CAI3B,CAAC;IAEK,MAAM,cAAc;;;;;;MAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetPasskeyRegistrationOptionsCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../../../constants");
|
|
6
|
+
const api_1 = require("../../../api");
|
|
7
|
+
var GetPasskeyRegistrationOptionsCommand;
|
|
8
|
+
(function (GetPasskeyRegistrationOptionsCommand) {
|
|
9
|
+
GetPasskeyRegistrationOptionsCommand.url = api_1.REST_API.AUTH.PASSKEY.GET_REGISTRATION_OPTIONS;
|
|
10
|
+
GetPasskeyRegistrationOptionsCommand.TSQ_url = GetPasskeyRegistrationOptionsCommand.url;
|
|
11
|
+
GetPasskeyRegistrationOptionsCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.AUTH_ROUTES.PASSKEY.GET_REGISTRATION_OPTIONS, 'get', 'Get the registration options for passkey');
|
|
12
|
+
GetPasskeyRegistrationOptionsCommand.ResponseSchema = zod_1.z.object({
|
|
13
|
+
response: zod_1.z.unknown().transform((val) => val),
|
|
14
|
+
});
|
|
15
|
+
})(GetPasskeyRegistrationOptionsCommand || (exports.GetPasskeyRegistrationOptionsCommand = GetPasskeyRegistrationOptionsCommand = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../commands/auth/passkey/index.ts"],"names":[],"mappings":"AAAA,cAAc,sCAAsC,CAAC;AACrD,cAAc,oCAAoC,CAAC;AACnD,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./get-authentication-options.command"), exports);
|
|
18
|
+
__exportStar(require("./get-registration-options.command"), exports);
|
|
19
|
+
__exportStar(require("./verify-authentication.command"), exports);
|
|
20
|
+
__exportStar(require("./verify-registration.command"), exports);
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type AuthenticationResponseJSON } from '@simplewebauthn/server';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export declare namespace VerifyPasskeyAuthenticationCommand {
|
|
4
|
+
const url: "/api/auth/passkey/authentication/verify";
|
|
5
|
+
const TSQ_url: "/api/auth/passkey/authentication/verify";
|
|
6
|
+
const endpointDetails: import("../../../constants").EndpointDetails;
|
|
7
|
+
const RequestSchema: z.ZodObject<{
|
|
8
|
+
response: z.ZodEffects<z.ZodUnknown, AuthenticationResponseJSON, unknown>;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
response: AuthenticationResponseJSON;
|
|
11
|
+
}, {
|
|
12
|
+
response?: unknown;
|
|
13
|
+
}>;
|
|
14
|
+
type Request = z.infer<typeof RequestSchema>;
|
|
15
|
+
const ResponseSchema: z.ZodObject<{
|
|
16
|
+
response: z.ZodObject<{
|
|
17
|
+
accessToken: z.ZodString;
|
|
18
|
+
}, "strip", z.ZodTypeAny, {
|
|
19
|
+
accessToken: string;
|
|
20
|
+
}, {
|
|
21
|
+
accessToken: string;
|
|
22
|
+
}>;
|
|
23
|
+
}, "strip", z.ZodTypeAny, {
|
|
24
|
+
response: {
|
|
25
|
+
accessToken: string;
|
|
26
|
+
};
|
|
27
|
+
}, {
|
|
28
|
+
response: {
|
|
29
|
+
accessToken: string;
|
|
30
|
+
};
|
|
31
|
+
}>;
|
|
32
|
+
type Response = z.infer<typeof ResponseSchema>;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=verify-authentication.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify-authentication.command.d.ts","sourceRoot":"","sources":["../../../../../commands/auth/passkey/verify-authentication.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,kCAAkC,CAAC;IACzC,MAAM,GAAG,2CAA8C,CAAC;IACxD,MAAM,OAAO,2CAAM,CAAC;IAEpB,MAAM,eAAe,8CAI3B,CAAC;IAEK,MAAM,aAAa;;;;;;MAExB,CAAC;IACH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;MAIzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VerifyPasskeyAuthenticationCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../../../constants");
|
|
6
|
+
const api_1 = require("../../../api");
|
|
7
|
+
var VerifyPasskeyAuthenticationCommand;
|
|
8
|
+
(function (VerifyPasskeyAuthenticationCommand) {
|
|
9
|
+
VerifyPasskeyAuthenticationCommand.url = api_1.REST_API.AUTH.PASSKEY.VERIFY_AUTHENTICATION;
|
|
10
|
+
VerifyPasskeyAuthenticationCommand.TSQ_url = VerifyPasskeyAuthenticationCommand.url;
|
|
11
|
+
VerifyPasskeyAuthenticationCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.AUTH_ROUTES.PASSKEY.VERIFY_AUTHENTICATION, 'post', 'Verify the authentication for passkey');
|
|
12
|
+
VerifyPasskeyAuthenticationCommand.RequestSchema = zod_1.z.object({
|
|
13
|
+
response: zod_1.z.unknown().transform((val) => val),
|
|
14
|
+
});
|
|
15
|
+
VerifyPasskeyAuthenticationCommand.ResponseSchema = zod_1.z.object({
|
|
16
|
+
response: zod_1.z.object({
|
|
17
|
+
accessToken: zod_1.z.string(),
|
|
18
|
+
}),
|
|
19
|
+
});
|
|
20
|
+
})(VerifyPasskeyAuthenticationCommand || (exports.VerifyPasskeyAuthenticationCommand = VerifyPasskeyAuthenticationCommand = {}));
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type RegistrationResponseJSON } from '@simplewebauthn/server';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export declare namespace VerifyPasskeyRegistrationCommand {
|
|
4
|
+
const url: "/api/auth/passkey/registration/verify";
|
|
5
|
+
const TSQ_url: "/api/auth/passkey/registration/verify";
|
|
6
|
+
const endpointDetails: import("../../../constants").EndpointDetails;
|
|
7
|
+
const RequestSchema: z.ZodObject<{
|
|
8
|
+
response: z.ZodEffects<z.ZodUnknown, RegistrationResponseJSON, unknown>;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
response: RegistrationResponseJSON;
|
|
11
|
+
}, {
|
|
12
|
+
response?: unknown;
|
|
13
|
+
}>;
|
|
14
|
+
type Request = z.infer<typeof RequestSchema>;
|
|
15
|
+
const ResponseSchema: z.ZodObject<{
|
|
16
|
+
response: z.ZodObject<{
|
|
17
|
+
verified: z.ZodBoolean;
|
|
18
|
+
message: z.ZodNullable<z.ZodString>;
|
|
19
|
+
}, "strip", z.ZodTypeAny, {
|
|
20
|
+
message: string | null;
|
|
21
|
+
verified: boolean;
|
|
22
|
+
}, {
|
|
23
|
+
message: string | null;
|
|
24
|
+
verified: boolean;
|
|
25
|
+
}>;
|
|
26
|
+
}, "strip", z.ZodTypeAny, {
|
|
27
|
+
response: {
|
|
28
|
+
message: string | null;
|
|
29
|
+
verified: boolean;
|
|
30
|
+
};
|
|
31
|
+
}, {
|
|
32
|
+
response: {
|
|
33
|
+
message: string | null;
|
|
34
|
+
verified: boolean;
|
|
35
|
+
};
|
|
36
|
+
}>;
|
|
37
|
+
type Response = z.infer<typeof ResponseSchema>;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=verify-registration.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify-registration.command.d.ts","sourceRoot":"","sources":["../../../../../commands/auth/passkey/verify-registration.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AACvE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,gCAAgC,CAAC;IACvC,MAAM,GAAG,yCAA4C,CAAC;IACtD,MAAM,OAAO,yCAAM,CAAC;IAEpB,MAAM,eAAe,8CAI3B,CAAC;IAEK,MAAM,aAAa;;;;;;MAExB,CAAC;IACH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;MAKzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VerifyPasskeyRegistrationCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../../../constants");
|
|
6
|
+
const api_1 = require("../../../api");
|
|
7
|
+
var VerifyPasskeyRegistrationCommand;
|
|
8
|
+
(function (VerifyPasskeyRegistrationCommand) {
|
|
9
|
+
VerifyPasskeyRegistrationCommand.url = api_1.REST_API.AUTH.PASSKEY.VERIFY_REGISTRATION;
|
|
10
|
+
VerifyPasskeyRegistrationCommand.TSQ_url = VerifyPasskeyRegistrationCommand.url;
|
|
11
|
+
VerifyPasskeyRegistrationCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.AUTH_ROUTES.PASSKEY.VERIFY_REGISTRATION, 'post', 'Verify the registration for passkey');
|
|
12
|
+
VerifyPasskeyRegistrationCommand.RequestSchema = zod_1.z.object({
|
|
13
|
+
response: zod_1.z.unknown().transform((val) => val),
|
|
14
|
+
});
|
|
15
|
+
VerifyPasskeyRegistrationCommand.ResponseSchema = zod_1.z.object({
|
|
16
|
+
response: zod_1.z.object({
|
|
17
|
+
verified: zod_1.z.boolean(),
|
|
18
|
+
message: zod_1.z.nullable(zod_1.z.string()),
|
|
19
|
+
}),
|
|
20
|
+
});
|
|
21
|
+
})(VerifyPasskeyRegistrationCommand || (exports.VerifyPasskeyRegistrationCommand = VerifyPasskeyRegistrationCommand = {}));
|
|
@@ -2,5 +2,7 @@ import { TSubscriptionTemplateType } from '../subscription-template';
|
|
|
2
2
|
export declare const CACHE_KEYS: {
|
|
3
3
|
readonly SUBSCRIPTION_SETTINGS: "subscription_settings";
|
|
4
4
|
readonly SUBSCRIPTION_TEMPLATE: (name: string, type: TSubscriptionTemplateType) => string;
|
|
5
|
+
readonly PASSKEY_REGISTRATION_OPTIONS: (uuid: string) => string;
|
|
6
|
+
readonly PASSKEY_AUTHENTICATION_OPTIONS: (uuid: string) => string;
|
|
5
7
|
};
|
|
6
8
|
//# sourceMappingURL=cache-keys.constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cache-keys.constants.d.ts","sourceRoot":"","sources":["../../../../constants/cache-keys/cache-keys.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAErE,eAAO,MAAM,UAAU;;2CAEW,MAAM,QAAQ,yBAAyB;
|
|
1
|
+
{"version":3,"file":"cache-keys.constants.d.ts","sourceRoot":"","sources":["../../../../constants/cache-keys/cache-keys.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAErE,eAAO,MAAM,UAAU;;2CAEW,MAAM,QAAQ,yBAAyB;kDAEhC,MAAM;oDACJ,MAAM;CACvC,CAAC"}
|
|
@@ -4,4 +4,6 @@ exports.CACHE_KEYS = void 0;
|
|
|
4
4
|
exports.CACHE_KEYS = {
|
|
5
5
|
SUBSCRIPTION_SETTINGS: 'subscription_settings',
|
|
6
6
|
SUBSCRIPTION_TEMPLATE: (name, type) => `subscription_template:${name}:${type}`,
|
|
7
|
+
PASSKEY_REGISTRATION_OPTIONS: (uuid) => `passkey_registration_options:${uuid}`,
|
|
8
|
+
PASSKEY_AUTHENTICATION_OPTIONS: (uuid) => `passkey_authentication_options:${uuid}`,
|
|
7
9
|
};
|
|
@@ -979,5 +979,10 @@ export declare const ERRORS: {
|
|
|
979
979
|
readonly message: "Name or templates are required";
|
|
980
980
|
readonly httpCode: 400;
|
|
981
981
|
};
|
|
982
|
+
readonly PASSKEY_NOT_FOUND: {
|
|
983
|
+
readonly code: "A191";
|
|
984
|
+
readonly message: "Passkey not found";
|
|
985
|
+
readonly httpCode: 404;
|
|
986
|
+
};
|
|
982
987
|
};
|
|
983
988
|
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../constants/errors/errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAwJY,MAAM;;;;;;;;;;wCAUN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCA4IN,MAAM
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../constants/errors/errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAwJY,MAAM;;;;;;;;;;wCAUN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCA4IN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8oB3B,CAAC"}
|
|
@@ -17,6 +17,13 @@ export declare const EVENTS: {
|
|
|
17
17
|
};
|
|
18
18
|
readonly FIRST_CONNECTED: "user.first_connected";
|
|
19
19
|
readonly BANDWIDTH_USAGE_THRESHOLD_REACHED: "user.bandwidth_usage_threshold_reached";
|
|
20
|
+
/**
|
|
21
|
+
* Emitted when a user is not connected to the panel for a certain amount of time.
|
|
22
|
+
* Active only when NOT_CONNECTED_USERS_NOTIFICATIONS_ENABLED is true in .env.
|
|
23
|
+
* Note: For performance reasons, user entity's activeInternalSquads and lastConnectedNode fields are always empty.
|
|
24
|
+
* Includes additional meta object with notConnectedAfterHours field.
|
|
25
|
+
*/
|
|
26
|
+
readonly NOT_CONNECTED: "user.not_connected";
|
|
20
27
|
};
|
|
21
28
|
/**
|
|
22
29
|
* HWID events are emitted only when HWID Device Limit feature is enabled in .env.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../constants/events/events.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../constants/events/events.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;QAmBX;;;;;WAKG;;;IAGP;;;;;;OAMG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwCG,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC;AACzE,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC;AACzE,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC;AAClF,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC;AAC/E,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC;AACtE,MAAM,MAAM,sBAAsB,GAC9B,CAAC,OAAO,MAAM,CAAC,iBAAiB,CAAC,CAAC,MAAM,OAAO,MAAM,CAAC,iBAAiB,CAAC,CAAC"}
|
|
@@ -20,6 +20,13 @@ exports.EVENTS = {
|
|
|
20
20
|
},
|
|
21
21
|
FIRST_CONNECTED: 'user.first_connected',
|
|
22
22
|
BANDWIDTH_USAGE_THRESHOLD_REACHED: 'user.bandwidth_usage_threshold_reached',
|
|
23
|
+
/**
|
|
24
|
+
* Emitted when a user is not connected to the panel for a certain amount of time.
|
|
25
|
+
* Active only when NOT_CONNECTED_USERS_NOTIFICATIONS_ENABLED is true in .env.
|
|
26
|
+
* Note: For performance reasons, user entity's activeInternalSquads and lastConnectedNode fields are always empty.
|
|
27
|
+
* Includes additional meta object with notConnectedAfterHours field.
|
|
28
|
+
*/
|
|
29
|
+
NOT_CONNECTED: 'user.not_connected',
|
|
23
30
|
},
|
|
24
31
|
/**
|
|
25
32
|
* HWID events are emitted only when HWID Device Limit feature is enabled in .env.
|
|
@@ -11,4 +11,10 @@ exports.AUTH_ROUTES = {
|
|
|
11
11
|
AUTHORIZE: 'oauth2/authorize',
|
|
12
12
|
CALLBACK: 'oauth2/callback',
|
|
13
13
|
},
|
|
14
|
+
PASSKEY: {
|
|
15
|
+
GET_REGISTRATION_OPTIONS: 'passkey/registration/options', // get
|
|
16
|
+
VERIFY_REGISTRATION: 'passkey/registration/verify', // post
|
|
17
|
+
GET_AUTHENTICATION_OPTIONS: 'passkey/authentication/options', // get
|
|
18
|
+
VERIFY_AUTHENTICATION: 'passkey/authentication/verify', // post
|
|
19
|
+
},
|
|
14
20
|
};
|
|
@@ -49,6 +49,12 @@ exports.REST_API = {
|
|
|
49
49
|
AUTHORIZE: `${exports.ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.OAUTH2.AUTHORIZE}`,
|
|
50
50
|
CALLBACK: `${exports.ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.OAUTH2.CALLBACK}`,
|
|
51
51
|
},
|
|
52
|
+
PASSKEY: {
|
|
53
|
+
GET_REGISTRATION_OPTIONS: `${exports.ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.PASSKEY.GET_REGISTRATION_OPTIONS}`,
|
|
54
|
+
VERIFY_REGISTRATION: `${exports.ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.PASSKEY.VERIFY_REGISTRATION}`,
|
|
55
|
+
GET_AUTHENTICATION_OPTIONS: `${exports.ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.PASSKEY.GET_AUTHENTICATION_OPTIONS}`,
|
|
56
|
+
VERIFY_AUTHENTICATION: `${exports.ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.PASSKEY.VERIFY_AUTHENTICATION}`,
|
|
57
|
+
},
|
|
52
58
|
},
|
|
53
59
|
API_TOKENS: {
|
|
54
60
|
CREATE: `${exports.ROOT}/${CONTROLLERS.API_TOKENS_CONTROLLER}/${CONTROLLERS.API_TOKENS_ROUTES.CREATE}`,
|
|
@@ -17,4 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./get-status.command"), exports);
|
|
18
18
|
__exportStar(require("./login.command"), exports);
|
|
19
19
|
__exportStar(require("./oauth2"), exports);
|
|
20
|
+
__exportStar(require("./passkey"), exports);
|
|
20
21
|
__exportStar(require("./register.command"), exports);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetPasskeyAuthenticationOptionsCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../../../constants");
|
|
6
|
+
const api_1 = require("../../../api");
|
|
7
|
+
var GetPasskeyAuthenticationOptionsCommand;
|
|
8
|
+
(function (GetPasskeyAuthenticationOptionsCommand) {
|
|
9
|
+
GetPasskeyAuthenticationOptionsCommand.url = api_1.REST_API.AUTH.PASSKEY.GET_AUTHENTICATION_OPTIONS;
|
|
10
|
+
GetPasskeyAuthenticationOptionsCommand.TSQ_url = GetPasskeyAuthenticationOptionsCommand.url;
|
|
11
|
+
GetPasskeyAuthenticationOptionsCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.AUTH_ROUTES.PASSKEY.GET_AUTHENTICATION_OPTIONS, 'get', 'Get the authentication options for passkey');
|
|
12
|
+
GetPasskeyAuthenticationOptionsCommand.ResponseSchema = zod_1.z.object({
|
|
13
|
+
response: zod_1.z.unknown().transform((val) => val),
|
|
14
|
+
});
|
|
15
|
+
})(GetPasskeyAuthenticationOptionsCommand || (exports.GetPasskeyAuthenticationOptionsCommand = GetPasskeyAuthenticationOptionsCommand = {}));
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetPasskeyRegistrationOptionsCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../../../constants");
|
|
6
|
+
const api_1 = require("../../../api");
|
|
7
|
+
var GetPasskeyRegistrationOptionsCommand;
|
|
8
|
+
(function (GetPasskeyRegistrationOptionsCommand) {
|
|
9
|
+
GetPasskeyRegistrationOptionsCommand.url = api_1.REST_API.AUTH.PASSKEY.GET_REGISTRATION_OPTIONS;
|
|
10
|
+
GetPasskeyRegistrationOptionsCommand.TSQ_url = GetPasskeyRegistrationOptionsCommand.url;
|
|
11
|
+
GetPasskeyRegistrationOptionsCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.AUTH_ROUTES.PASSKEY.GET_REGISTRATION_OPTIONS, 'get', 'Get the registration options for passkey');
|
|
12
|
+
GetPasskeyRegistrationOptionsCommand.ResponseSchema = zod_1.z.object({
|
|
13
|
+
response: zod_1.z.unknown().transform((val) => val),
|
|
14
|
+
});
|
|
15
|
+
})(GetPasskeyRegistrationOptionsCommand || (exports.GetPasskeyRegistrationOptionsCommand = GetPasskeyRegistrationOptionsCommand = {}));
|
|
@@ -0,0 +1,20 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./get-authentication-options.command"), exports);
|
|
18
|
+
__exportStar(require("./get-registration-options.command"), exports);
|
|
19
|
+
__exportStar(require("./verify-authentication.command"), exports);
|
|
20
|
+
__exportStar(require("./verify-registration.command"), exports);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VerifyPasskeyAuthenticationCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../../../constants");
|
|
6
|
+
const api_1 = require("../../../api");
|
|
7
|
+
var VerifyPasskeyAuthenticationCommand;
|
|
8
|
+
(function (VerifyPasskeyAuthenticationCommand) {
|
|
9
|
+
VerifyPasskeyAuthenticationCommand.url = api_1.REST_API.AUTH.PASSKEY.VERIFY_AUTHENTICATION;
|
|
10
|
+
VerifyPasskeyAuthenticationCommand.TSQ_url = VerifyPasskeyAuthenticationCommand.url;
|
|
11
|
+
VerifyPasskeyAuthenticationCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.AUTH_ROUTES.PASSKEY.VERIFY_AUTHENTICATION, 'post', 'Verify the authentication for passkey');
|
|
12
|
+
VerifyPasskeyAuthenticationCommand.RequestSchema = zod_1.z.object({
|
|
13
|
+
response: zod_1.z.unknown().transform((val) => val),
|
|
14
|
+
});
|
|
15
|
+
VerifyPasskeyAuthenticationCommand.ResponseSchema = zod_1.z.object({
|
|
16
|
+
response: zod_1.z.object({
|
|
17
|
+
accessToken: zod_1.z.string(),
|
|
18
|
+
}),
|
|
19
|
+
});
|
|
20
|
+
})(VerifyPasskeyAuthenticationCommand || (exports.VerifyPasskeyAuthenticationCommand = VerifyPasskeyAuthenticationCommand = {}));
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VerifyPasskeyRegistrationCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../../../constants");
|
|
6
|
+
const api_1 = require("../../../api");
|
|
7
|
+
var VerifyPasskeyRegistrationCommand;
|
|
8
|
+
(function (VerifyPasskeyRegistrationCommand) {
|
|
9
|
+
VerifyPasskeyRegistrationCommand.url = api_1.REST_API.AUTH.PASSKEY.VERIFY_REGISTRATION;
|
|
10
|
+
VerifyPasskeyRegistrationCommand.TSQ_url = VerifyPasskeyRegistrationCommand.url;
|
|
11
|
+
VerifyPasskeyRegistrationCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.AUTH_ROUTES.PASSKEY.VERIFY_REGISTRATION, 'post', 'Verify the registration for passkey');
|
|
12
|
+
VerifyPasskeyRegistrationCommand.RequestSchema = zod_1.z.object({
|
|
13
|
+
response: zod_1.z.unknown().transform((val) => val),
|
|
14
|
+
});
|
|
15
|
+
VerifyPasskeyRegistrationCommand.ResponseSchema = zod_1.z.object({
|
|
16
|
+
response: zod_1.z.object({
|
|
17
|
+
verified: zod_1.z.boolean(),
|
|
18
|
+
message: zod_1.z.nullable(zod_1.z.string()),
|
|
19
|
+
}),
|
|
20
|
+
});
|
|
21
|
+
})(VerifyPasskeyRegistrationCommand || (exports.VerifyPasskeyRegistrationCommand = VerifyPasskeyRegistrationCommand = {}));
|
|
@@ -4,4 +4,6 @@ exports.CACHE_KEYS = void 0;
|
|
|
4
4
|
exports.CACHE_KEYS = {
|
|
5
5
|
SUBSCRIPTION_SETTINGS: 'subscription_settings',
|
|
6
6
|
SUBSCRIPTION_TEMPLATE: (name, type) => `subscription_template:${name}:${type}`,
|
|
7
|
+
PASSKEY_REGISTRATION_OPTIONS: (uuid) => `passkey_registration_options:${uuid}`,
|
|
8
|
+
PASSKEY_AUTHENTICATION_OPTIONS: (uuid) => `passkey_authentication_options:${uuid}`,
|
|
7
9
|
};
|
|
@@ -20,6 +20,13 @@ exports.EVENTS = {
|
|
|
20
20
|
},
|
|
21
21
|
FIRST_CONNECTED: 'user.first_connected',
|
|
22
22
|
BANDWIDTH_USAGE_THRESHOLD_REACHED: 'user.bandwidth_usage_threshold_reached',
|
|
23
|
+
/**
|
|
24
|
+
* Emitted when a user is not connected to the panel for a certain amount of time.
|
|
25
|
+
* Active only when NOT_CONNECTED_USERS_NOTIFICATIONS_ENABLED is true in .env.
|
|
26
|
+
* Note: For performance reasons, user entity's activeInternalSquads and lastConnectedNode fields are always empty.
|
|
27
|
+
* Includes additional meta object with notConnectedAfterHours field.
|
|
28
|
+
*/
|
|
29
|
+
NOT_CONNECTED: 'user.not_connected',
|
|
23
30
|
},
|
|
24
31
|
/**
|
|
25
32
|
* HWID events are emitted only when HWID Device Limit feature is enabled in .env.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remnawave/backend-contract",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.12",
|
|
4
4
|
"public": true,
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"description": "A contract library for Remnawave Backend. It can be used in backend and frontend.",
|
|
@@ -29,5 +29,8 @@
|
|
|
29
29
|
"keywords": [],
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"zod": "^3.25.76"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@simplewebauthn/server": "13.2.2"
|
|
32
35
|
}
|
|
33
36
|
}
|