@absolutejs/auth 0.75.7 → 0.76.1
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/dist/agents/context.d.ts +2 -6
- package/dist/agents/index.js +5 -6
- package/dist/agents/index.js.map +3 -3
- package/dist/agents/routes.d.ts +4 -10
- package/dist/authContext.d.ts +66 -178
- package/dist/authorization/protectPermission.d.ts +3 -8
- package/dist/cli/migrate.js +19 -15
- package/dist/cli/migrate.js.map +5 -5
- package/dist/htmx/configuredRoutes.d.ts +37 -126
- package/dist/htmx/routes.d.ts +37 -126
- package/dist/index.d.ts +237 -431
- package/dist/index.js +332 -113
- package/dist/index.js.map +17 -17
- package/dist/mfa/challenge.d.ts +53 -7
- package/dist/mfa/management.d.ts +49 -6
- package/dist/mfa/postgresMfaStore.d.ts +31 -1
- package/dist/mfa/rotation.d.ts +1 -1
- package/dist/mfa/routes.d.ts +78 -2
- package/dist/mfa/sms.d.ts +7 -2
- package/dist/mfa/totp.d.ts +8 -2
- package/dist/mfa/types.d.ts +47 -0
- package/dist/routes/protectRoute.d.ts +4 -21
- package/dist/routes/stepUp.d.ts +3 -8
- package/dist/server.js +330 -113
- package/dist/server.js.map +17 -17
- package/package.json +1 -1
|
@@ -14,36 +14,14 @@ export declare const createConfiguredAuthHtmxRoutes: <UserType>({ authSessionSto
|
|
|
14
14
|
unregisteredSession: import("..").UnregisteredSessionRecord;
|
|
15
15
|
};
|
|
16
16
|
derive: {
|
|
17
|
-
readonly absoluteAuthStatus: {
|
|
18
|
-
error: {
|
|
19
|
-
readonly code: "Bad Request";
|
|
20
|
-
readonly message: "Cookies are missing";
|
|
21
|
-
};
|
|
22
|
-
user: null;
|
|
23
|
-
impersonator?: undefined;
|
|
24
|
-
} | {
|
|
25
|
-
error: null;
|
|
26
|
-
impersonator: import("..").Impersonator | undefined;
|
|
27
|
-
user: AuthHtmxUser | null;
|
|
28
|
-
};
|
|
29
17
|
readonly authPrincipal: import("..").AuthPrincipal<AuthHtmxUser> | undefined;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
readonly message: "User is not authenticated";
|
|
38
|
-
}) => AuthFailReturn) | undefined): Promise<(import("elysia").ElysiaStatus<"Bad Request", "Cookies are missing", 400> | import("elysia").ElysiaStatus<"Unauthorized", "User is not authenticated", 401>) | AuthReturn | Awaited<AuthFailReturn>>;
|
|
39
|
-
<AuthReturn, AuthFailReturn_1 = never>(handleAuth: (user: AuthHtmxUser) => AuthReturn, handleAuthFail?: ((error: {
|
|
40
|
-
readonly code: "Bad Request";
|
|
41
|
-
readonly message: "Cookies are missing";
|
|
42
|
-
} | {
|
|
43
|
-
readonly code: "Unauthorized";
|
|
44
|
-
readonly message: "User is not authenticated";
|
|
45
|
-
}) => AuthFailReturn_1) | undefined): Promise<(import("elysia").ElysiaStatus<"Bad Request", "Cookies are missing", 400> | import("elysia").ElysiaStatus<"Unauthorized", "User is not authenticated", 401>) | AuthReturn | Awaited<AuthFailReturn_1>>;
|
|
46
|
-
};
|
|
18
|
+
readonly protectRoute: <AuthReturn, AuthFailReturn = never>(handleAuth: (user: AuthHtmxUser) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
19
|
+
readonly code: "Bad Request";
|
|
20
|
+
readonly message: "Cookies are missing";
|
|
21
|
+
} | {
|
|
22
|
+
readonly code: "Unauthorized";
|
|
23
|
+
readonly message: "User is not authenticated";
|
|
24
|
+
}) => AuthFailReturn) | undefined) => import("elysia").ElysiaStatus<"Unauthorized", "User is not authenticated", 401> | import("elysia").ElysiaStatus<"Bad Request", "Cookies are missing", 400> | AuthReturn | Promise<AuthReturn> | NonNullable<AuthFailReturn>;
|
|
47
25
|
};
|
|
48
26
|
}, {
|
|
49
27
|
typebox: {};
|
|
@@ -60,22 +38,14 @@ export declare const createConfiguredAuthHtmxRoutes: <UserType>({ authSessionSto
|
|
|
60
38
|
macroFn: {};
|
|
61
39
|
parser: {};
|
|
62
40
|
response: import("elysia/types").ExtractErrorFromHandle<{
|
|
63
|
-
readonly
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
<AuthReturn, AuthFailReturn_1 = never>(handleAuth: (user: AuthHtmxUser) => AuthReturn, handleAuthFail?: ((error: {
|
|
72
|
-
readonly code: "Bad Request";
|
|
73
|
-
readonly message: "Cookies are missing";
|
|
74
|
-
} | {
|
|
75
|
-
readonly code: "Unauthorized";
|
|
76
|
-
readonly message: "User is not authenticated";
|
|
77
|
-
}) => AuthFailReturn_1) | undefined): Promise<(import("elysia").ElysiaStatus<"Bad Request", "Cookies are missing", 400> | import("elysia").ElysiaStatus<"Unauthorized", "User is not authenticated", 401>) | AuthReturn | Awaited<AuthFailReturn_1>>;
|
|
78
|
-
};
|
|
41
|
+
readonly authPrincipal: import("..").AuthPrincipal<AuthHtmxUser> | undefined;
|
|
42
|
+
readonly protectRoute: <AuthReturn, AuthFailReturn = never>(handleAuth: (user: AuthHtmxUser) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
43
|
+
readonly code: "Bad Request";
|
|
44
|
+
readonly message: "Cookies are missing";
|
|
45
|
+
} | {
|
|
46
|
+
readonly code: "Unauthorized";
|
|
47
|
+
readonly message: "User is not authenticated";
|
|
48
|
+
}) => AuthFailReturn) | undefined) => import("elysia").ElysiaStatus<"Unauthorized", "User is not authenticated", 401> | import("elysia").ElysiaStatus<"Bad Request", "Cookies are missing", 400> | AuthReturn | Promise<AuthReturn> | NonNullable<AuthFailReturn>;
|
|
79
49
|
}>;
|
|
80
50
|
}, {
|
|
81
51
|
htmx: {
|
|
@@ -242,9 +212,7 @@ export declare const createConfiguredAuthHtmxRoutes: <UserType>({ authSessionSto
|
|
|
242
212
|
query: unknown;
|
|
243
213
|
headers: unknown;
|
|
244
214
|
response: {
|
|
245
|
-
|
|
246
|
-
401: "User is not authenticated";
|
|
247
|
-
200: Response;
|
|
215
|
+
200: {};
|
|
248
216
|
422: {
|
|
249
217
|
type: "validation";
|
|
250
218
|
title: "Validation Error";
|
|
@@ -273,9 +241,7 @@ export declare const createConfiguredAuthHtmxRoutes: <UserType>({ authSessionSto
|
|
|
273
241
|
query: unknown;
|
|
274
242
|
headers: unknown;
|
|
275
243
|
response: {
|
|
276
|
-
|
|
277
|
-
401: "User is not authenticated";
|
|
278
|
-
200: Response;
|
|
244
|
+
200: {};
|
|
279
245
|
422: {
|
|
280
246
|
type: "validation";
|
|
281
247
|
title: "Validation Error";
|
|
@@ -305,9 +271,7 @@ export declare const createConfiguredAuthHtmxRoutes: <UserType>({ authSessionSto
|
|
|
305
271
|
query: unknown;
|
|
306
272
|
headers: unknown;
|
|
307
273
|
response: {
|
|
308
|
-
|
|
309
|
-
401: "User is not authenticated";
|
|
310
|
-
200: Response;
|
|
274
|
+
200: {};
|
|
311
275
|
422: {
|
|
312
276
|
type: "validation";
|
|
313
277
|
title: "Validation Error";
|
|
@@ -336,9 +300,7 @@ export declare const createConfiguredAuthHtmxRoutes: <UserType>({ authSessionSto
|
|
|
336
300
|
query: unknown;
|
|
337
301
|
headers: unknown;
|
|
338
302
|
response: {
|
|
339
|
-
|
|
340
|
-
401: "User is not authenticated";
|
|
341
|
-
200: Response;
|
|
303
|
+
200: {};
|
|
342
304
|
422: {
|
|
343
305
|
type: "validation";
|
|
344
306
|
title: "Validation Error";
|
|
@@ -367,9 +329,7 @@ export declare const createConfiguredAuthHtmxRoutes: <UserType>({ authSessionSto
|
|
|
367
329
|
query: unknown;
|
|
368
330
|
headers: unknown;
|
|
369
331
|
response: {
|
|
370
|
-
|
|
371
|
-
401: "User is not authenticated";
|
|
372
|
-
200: Response;
|
|
332
|
+
200: {};
|
|
373
333
|
422: {
|
|
374
334
|
type: "validation";
|
|
375
335
|
title: "Validation Error";
|
|
@@ -426,9 +386,7 @@ export declare const createConfiguredAuthHtmxRoutes: <UserType>({ authSessionSto
|
|
|
426
386
|
query: unknown;
|
|
427
387
|
headers: unknown;
|
|
428
388
|
response: {
|
|
429
|
-
|
|
430
|
-
401: "User is not authenticated";
|
|
431
|
-
200: Response;
|
|
389
|
+
200: {};
|
|
432
390
|
422: {
|
|
433
391
|
type: "validation";
|
|
434
392
|
title: "Validation Error";
|
|
@@ -459,9 +417,7 @@ export declare const createConfiguredAuthHtmxRoutes: <UserType>({ authSessionSto
|
|
|
459
417
|
query: unknown;
|
|
460
418
|
headers: unknown;
|
|
461
419
|
response: {
|
|
462
|
-
|
|
463
|
-
401: "User is not authenticated";
|
|
464
|
-
200: Response;
|
|
420
|
+
200: {};
|
|
465
421
|
422: {
|
|
466
422
|
type: "validation";
|
|
467
423
|
title: "Validation Error";
|
|
@@ -513,9 +469,7 @@ export declare const createConfiguredAuthHtmxRoutes: <UserType>({ authSessionSto
|
|
|
513
469
|
query: unknown;
|
|
514
470
|
headers: unknown;
|
|
515
471
|
response: {
|
|
516
|
-
|
|
517
|
-
401: "User is not authenticated";
|
|
518
|
-
200: Response;
|
|
472
|
+
200: {};
|
|
519
473
|
422: {
|
|
520
474
|
type: "validation";
|
|
521
475
|
title: "Validation Error";
|
|
@@ -694,36 +648,14 @@ export declare const createConfiguredAuthHtmxRoutes: <UserType>({ authSessionSto
|
|
|
694
648
|
unregisteredSession: import("..").UnregisteredSessionRecord;
|
|
695
649
|
};
|
|
696
650
|
derive: {
|
|
697
|
-
readonly absoluteAuthStatus: {
|
|
698
|
-
error: {
|
|
699
|
-
readonly code: "Bad Request";
|
|
700
|
-
readonly message: "Cookies are missing";
|
|
701
|
-
};
|
|
702
|
-
user: null;
|
|
703
|
-
impersonator?: undefined;
|
|
704
|
-
} | {
|
|
705
|
-
error: null;
|
|
706
|
-
impersonator: import("..").Impersonator | undefined;
|
|
707
|
-
user: AuthHtmxUser | null;
|
|
708
|
-
};
|
|
709
651
|
readonly authPrincipal: import("..").AuthPrincipal<AuthHtmxUser> | undefined;
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
readonly message: "User is not authenticated";
|
|
718
|
-
}) => AuthFailReturn) | undefined): Promise<(import("elysia").ElysiaStatus<"Bad Request", "Cookies are missing", 400> | import("elysia").ElysiaStatus<"Unauthorized", "User is not authenticated", 401>) | AuthReturn | Awaited<AuthFailReturn>>;
|
|
719
|
-
<AuthReturn, AuthFailReturn_1 = never>(handleAuth: (user: AuthHtmxUser) => AuthReturn, handleAuthFail?: ((error: {
|
|
720
|
-
readonly code: "Bad Request";
|
|
721
|
-
readonly message: "Cookies are missing";
|
|
722
|
-
} | {
|
|
723
|
-
readonly code: "Unauthorized";
|
|
724
|
-
readonly message: "User is not authenticated";
|
|
725
|
-
}) => AuthFailReturn_1) | undefined): Promise<(import("elysia").ElysiaStatus<"Bad Request", "Cookies are missing", 400> | import("elysia").ElysiaStatus<"Unauthorized", "User is not authenticated", 401>) | AuthReturn | Awaited<AuthFailReturn_1>>;
|
|
726
|
-
};
|
|
652
|
+
readonly protectRoute: <AuthReturn, AuthFailReturn = never>(handleAuth: (user: AuthHtmxUser) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
653
|
+
readonly code: "Bad Request";
|
|
654
|
+
readonly message: "Cookies are missing";
|
|
655
|
+
} | {
|
|
656
|
+
readonly code: "Unauthorized";
|
|
657
|
+
readonly message: "User is not authenticated";
|
|
658
|
+
}) => AuthFailReturn) | undefined) => import("elysia").ElysiaStatus<"Unauthorized", "User is not authenticated", 401> | import("elysia").ElysiaStatus<"Bad Request", "Cookies are missing", 400> | AuthReturn | Promise<AuthReturn> | NonNullable<AuthFailReturn>;
|
|
727
659
|
};
|
|
728
660
|
} & {
|
|
729
661
|
derive: {};
|
|
@@ -736,33 +668,12 @@ export declare const createConfiguredAuthHtmxRoutes: <UserType>({ authSessionSto
|
|
|
736
668
|
session: import("..").SessionRecord<AuthHtmxUser>;
|
|
737
669
|
unregisteredSession: import("..").UnregisteredSessionRecord;
|
|
738
670
|
};
|
|
739
|
-
readonly absoluteAuthStatus: {
|
|
740
|
-
error: {
|
|
741
|
-
readonly code: "Bad Request";
|
|
742
|
-
readonly message: "Cookies are missing";
|
|
743
|
-
};
|
|
744
|
-
user: null;
|
|
745
|
-
impersonator?: undefined;
|
|
746
|
-
} | {
|
|
747
|
-
error: null;
|
|
748
|
-
impersonator: import("..").Impersonator | undefined;
|
|
749
|
-
user: AuthHtmxUser | null;
|
|
750
|
-
};
|
|
751
671
|
readonly authPrincipal: import("..").AuthPrincipal<AuthHtmxUser> | undefined;
|
|
752
|
-
readonly protectRoute: {
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
}) => AuthFailReturn) | undefined): Promise<(import("elysia").ElysiaStatus<"Bad Request", "Cookies are missing", 400> | import("elysia").ElysiaStatus<"Unauthorized", "User is not authenticated", 401>) | AuthReturn | Awaited<AuthFailReturn>>;
|
|
760
|
-
<AuthReturn, AuthFailReturn_1 = never>(handleAuth: (user: AuthHtmxUser) => AuthReturn, handleAuthFail?: ((error: {
|
|
761
|
-
readonly code: "Bad Request";
|
|
762
|
-
readonly message: "Cookies are missing";
|
|
763
|
-
} | {
|
|
764
|
-
readonly code: "Unauthorized";
|
|
765
|
-
readonly message: "User is not authenticated";
|
|
766
|
-
}) => AuthFailReturn_1) | undefined): Promise<(import("elysia").ElysiaStatus<"Bad Request", "Cookies are missing", 400> | import("elysia").ElysiaStatus<"Unauthorized", "User is not authenticated", 401>) | AuthReturn | Awaited<AuthFailReturn_1>>;
|
|
767
|
-
};
|
|
672
|
+
readonly protectRoute: <AuthReturn, AuthFailReturn = never>(handleAuth: (user: AuthHtmxUser) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
673
|
+
readonly code: "Bad Request";
|
|
674
|
+
readonly message: "Cookies are missing";
|
|
675
|
+
} | {
|
|
676
|
+
readonly code: "Unauthorized";
|
|
677
|
+
readonly message: "User is not authenticated";
|
|
678
|
+
}) => AuthFailReturn) | undefined) => import("elysia").ElysiaStatus<"Unauthorized", "User is not authenticated", 401> | import("elysia").ElysiaStatus<"Bad Request", "Cookies are missing", 400> | AuthReturn | Promise<AuthReturn> | NonNullable<AuthFailReturn>;
|
|
768
679
|
}) => Promise<Response>>;
|
package/dist/htmx/routes.d.ts
CHANGED
|
@@ -9,36 +9,14 @@ export declare const createAuthHtmxRoutes: <UserType extends AuthHtmxUser>(confi
|
|
|
9
9
|
unregisteredSession: import("..").UnregisteredSessionRecord;
|
|
10
10
|
};
|
|
11
11
|
derive: {
|
|
12
|
-
readonly absoluteAuthStatus: {
|
|
13
|
-
error: {
|
|
14
|
-
readonly code: "Bad Request";
|
|
15
|
-
readonly message: "Cookies are missing";
|
|
16
|
-
};
|
|
17
|
-
user: null;
|
|
18
|
-
impersonator?: undefined;
|
|
19
|
-
} | {
|
|
20
|
-
error: null;
|
|
21
|
-
impersonator: import("..").Impersonator | undefined;
|
|
22
|
-
user: NonNullable<UserType> | null;
|
|
23
|
-
};
|
|
24
12
|
readonly authPrincipal: import("..").AuthPrincipal<UserType> | undefined;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
readonly message: "User is not authenticated";
|
|
33
|
-
}) => AuthFailReturn) | undefined): Promise<(import("elysia").ElysiaStatus<"Bad Request", "Cookies are missing", 400> | import("elysia").ElysiaStatus<"Unauthorized", "User is not authenticated", 401>) | AuthReturn | Awaited<AuthFailReturn>>;
|
|
34
|
-
<AuthReturn, AuthFailReturn_1 = never>(handleAuth: (user: UserType) => AuthReturn, handleAuthFail?: ((error: {
|
|
35
|
-
readonly code: "Bad Request";
|
|
36
|
-
readonly message: "Cookies are missing";
|
|
37
|
-
} | {
|
|
38
|
-
readonly code: "Unauthorized";
|
|
39
|
-
readonly message: "User is not authenticated";
|
|
40
|
-
}) => AuthFailReturn_1) | undefined): Promise<(import("elysia").ElysiaStatus<"Bad Request", "Cookies are missing", 400> | import("elysia").ElysiaStatus<"Unauthorized", "User is not authenticated", 401>) | AuthReturn | Awaited<AuthFailReturn_1>>;
|
|
41
|
-
};
|
|
13
|
+
readonly protectRoute: <AuthReturn, AuthFailReturn = never>(handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
14
|
+
readonly code: "Bad Request";
|
|
15
|
+
readonly message: "Cookies are missing";
|
|
16
|
+
} | {
|
|
17
|
+
readonly code: "Unauthorized";
|
|
18
|
+
readonly message: "User is not authenticated";
|
|
19
|
+
}) => AuthFailReturn) | undefined) => import("elysia").ElysiaStatus<"Unauthorized", "User is not authenticated", 401> | import("elysia").ElysiaStatus<"Bad Request", "Cookies are missing", 400> | AuthReturn | Promise<AuthReturn> | NonNullable<AuthFailReturn>;
|
|
42
20
|
};
|
|
43
21
|
}, {
|
|
44
22
|
typebox: {};
|
|
@@ -55,22 +33,14 @@ export declare const createAuthHtmxRoutes: <UserType extends AuthHtmxUser>(confi
|
|
|
55
33
|
macroFn: {};
|
|
56
34
|
parser: {};
|
|
57
35
|
response: import("elysia/types").ExtractErrorFromHandle<{
|
|
58
|
-
readonly
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
<AuthReturn, AuthFailReturn_1 = never>(handleAuth: (user: UserType) => AuthReturn, handleAuthFail?: ((error: {
|
|
67
|
-
readonly code: "Bad Request";
|
|
68
|
-
readonly message: "Cookies are missing";
|
|
69
|
-
} | {
|
|
70
|
-
readonly code: "Unauthorized";
|
|
71
|
-
readonly message: "User is not authenticated";
|
|
72
|
-
}) => AuthFailReturn_1) | undefined): Promise<(import("elysia").ElysiaStatus<"Bad Request", "Cookies are missing", 400> | import("elysia").ElysiaStatus<"Unauthorized", "User is not authenticated", 401>) | AuthReturn | Awaited<AuthFailReturn_1>>;
|
|
73
|
-
};
|
|
36
|
+
readonly authPrincipal: import("..").AuthPrincipal<UserType> | undefined;
|
|
37
|
+
readonly protectRoute: <AuthReturn, AuthFailReturn = never>(handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
38
|
+
readonly code: "Bad Request";
|
|
39
|
+
readonly message: "Cookies are missing";
|
|
40
|
+
} | {
|
|
41
|
+
readonly code: "Unauthorized";
|
|
42
|
+
readonly message: "User is not authenticated";
|
|
43
|
+
}) => AuthFailReturn) | undefined) => import("elysia").ElysiaStatus<"Unauthorized", "User is not authenticated", 401> | import("elysia").ElysiaStatus<"Bad Request", "Cookies are missing", 400> | AuthReturn | Promise<AuthReturn> | NonNullable<AuthFailReturn>;
|
|
74
44
|
}>;
|
|
75
45
|
}, {
|
|
76
46
|
htmx: {
|
|
@@ -237,9 +207,7 @@ export declare const createAuthHtmxRoutes: <UserType extends AuthHtmxUser>(confi
|
|
|
237
207
|
query: unknown;
|
|
238
208
|
headers: unknown;
|
|
239
209
|
response: {
|
|
240
|
-
|
|
241
|
-
401: "User is not authenticated";
|
|
242
|
-
200: Response;
|
|
210
|
+
200: {};
|
|
243
211
|
422: {
|
|
244
212
|
type: "validation";
|
|
245
213
|
title: "Validation Error";
|
|
@@ -268,9 +236,7 @@ export declare const createAuthHtmxRoutes: <UserType extends AuthHtmxUser>(confi
|
|
|
268
236
|
query: unknown;
|
|
269
237
|
headers: unknown;
|
|
270
238
|
response: {
|
|
271
|
-
|
|
272
|
-
401: "User is not authenticated";
|
|
273
|
-
200: Response;
|
|
239
|
+
200: {};
|
|
274
240
|
422: {
|
|
275
241
|
type: "validation";
|
|
276
242
|
title: "Validation Error";
|
|
@@ -300,9 +266,7 @@ export declare const createAuthHtmxRoutes: <UserType extends AuthHtmxUser>(confi
|
|
|
300
266
|
query: unknown;
|
|
301
267
|
headers: unknown;
|
|
302
268
|
response: {
|
|
303
|
-
|
|
304
|
-
401: "User is not authenticated";
|
|
305
|
-
200: Response;
|
|
269
|
+
200: {};
|
|
306
270
|
422: {
|
|
307
271
|
type: "validation";
|
|
308
272
|
title: "Validation Error";
|
|
@@ -331,9 +295,7 @@ export declare const createAuthHtmxRoutes: <UserType extends AuthHtmxUser>(confi
|
|
|
331
295
|
query: unknown;
|
|
332
296
|
headers: unknown;
|
|
333
297
|
response: {
|
|
334
|
-
|
|
335
|
-
401: "User is not authenticated";
|
|
336
|
-
200: Response;
|
|
298
|
+
200: {};
|
|
337
299
|
422: {
|
|
338
300
|
type: "validation";
|
|
339
301
|
title: "Validation Error";
|
|
@@ -362,9 +324,7 @@ export declare const createAuthHtmxRoutes: <UserType extends AuthHtmxUser>(confi
|
|
|
362
324
|
query: unknown;
|
|
363
325
|
headers: unknown;
|
|
364
326
|
response: {
|
|
365
|
-
|
|
366
|
-
401: "User is not authenticated";
|
|
367
|
-
200: Response;
|
|
327
|
+
200: {};
|
|
368
328
|
422: {
|
|
369
329
|
type: "validation";
|
|
370
330
|
title: "Validation Error";
|
|
@@ -421,9 +381,7 @@ export declare const createAuthHtmxRoutes: <UserType extends AuthHtmxUser>(confi
|
|
|
421
381
|
query: unknown;
|
|
422
382
|
headers: unknown;
|
|
423
383
|
response: {
|
|
424
|
-
|
|
425
|
-
401: "User is not authenticated";
|
|
426
|
-
200: Response;
|
|
384
|
+
200: {};
|
|
427
385
|
422: {
|
|
428
386
|
type: "validation";
|
|
429
387
|
title: "Validation Error";
|
|
@@ -454,9 +412,7 @@ export declare const createAuthHtmxRoutes: <UserType extends AuthHtmxUser>(confi
|
|
|
454
412
|
query: unknown;
|
|
455
413
|
headers: unknown;
|
|
456
414
|
response: {
|
|
457
|
-
|
|
458
|
-
401: "User is not authenticated";
|
|
459
|
-
200: Response;
|
|
415
|
+
200: {};
|
|
460
416
|
422: {
|
|
461
417
|
type: "validation";
|
|
462
418
|
title: "Validation Error";
|
|
@@ -508,9 +464,7 @@ export declare const createAuthHtmxRoutes: <UserType extends AuthHtmxUser>(confi
|
|
|
508
464
|
query: unknown;
|
|
509
465
|
headers: unknown;
|
|
510
466
|
response: {
|
|
511
|
-
|
|
512
|
-
401: "User is not authenticated";
|
|
513
|
-
200: Response;
|
|
467
|
+
200: {};
|
|
514
468
|
422: {
|
|
515
469
|
type: "validation";
|
|
516
470
|
title: "Validation Error";
|
|
@@ -689,36 +643,14 @@ export declare const createAuthHtmxRoutes: <UserType extends AuthHtmxUser>(confi
|
|
|
689
643
|
unregisteredSession: import("..").UnregisteredSessionRecord;
|
|
690
644
|
};
|
|
691
645
|
derive: {
|
|
692
|
-
readonly absoluteAuthStatus: {
|
|
693
|
-
error: {
|
|
694
|
-
readonly code: "Bad Request";
|
|
695
|
-
readonly message: "Cookies are missing";
|
|
696
|
-
};
|
|
697
|
-
user: null;
|
|
698
|
-
impersonator?: undefined;
|
|
699
|
-
} | {
|
|
700
|
-
error: null;
|
|
701
|
-
impersonator: import("..").Impersonator | undefined;
|
|
702
|
-
user: NonNullable<UserType> | null;
|
|
703
|
-
};
|
|
704
646
|
readonly authPrincipal: import("..").AuthPrincipal<UserType> | undefined;
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
readonly message: "User is not authenticated";
|
|
713
|
-
}) => AuthFailReturn) | undefined): Promise<(import("elysia").ElysiaStatus<"Bad Request", "Cookies are missing", 400> | import("elysia").ElysiaStatus<"Unauthorized", "User is not authenticated", 401>) | AuthReturn | Awaited<AuthFailReturn>>;
|
|
714
|
-
<AuthReturn, AuthFailReturn_1 = never>(handleAuth: (user: UserType) => AuthReturn, handleAuthFail?: ((error: {
|
|
715
|
-
readonly code: "Bad Request";
|
|
716
|
-
readonly message: "Cookies are missing";
|
|
717
|
-
} | {
|
|
718
|
-
readonly code: "Unauthorized";
|
|
719
|
-
readonly message: "User is not authenticated";
|
|
720
|
-
}) => AuthFailReturn_1) | undefined): Promise<(import("elysia").ElysiaStatus<"Bad Request", "Cookies are missing", 400> | import("elysia").ElysiaStatus<"Unauthorized", "User is not authenticated", 401>) | AuthReturn | Awaited<AuthFailReturn_1>>;
|
|
721
|
-
};
|
|
647
|
+
readonly protectRoute: <AuthReturn, AuthFailReturn = never>(handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
648
|
+
readonly code: "Bad Request";
|
|
649
|
+
readonly message: "Cookies are missing";
|
|
650
|
+
} | {
|
|
651
|
+
readonly code: "Unauthorized";
|
|
652
|
+
readonly message: "User is not authenticated";
|
|
653
|
+
}) => AuthFailReturn) | undefined) => import("elysia").ElysiaStatus<"Unauthorized", "User is not authenticated", 401> | import("elysia").ElysiaStatus<"Bad Request", "Cookies are missing", 400> | AuthReturn | Promise<AuthReturn> | NonNullable<AuthFailReturn>;
|
|
722
654
|
};
|
|
723
655
|
} & {
|
|
724
656
|
derive: {};
|
|
@@ -731,33 +663,12 @@ export declare const createAuthHtmxRoutes: <UserType extends AuthHtmxUser>(confi
|
|
|
731
663
|
session: import("..").SessionRecord<UserType>;
|
|
732
664
|
unregisteredSession: import("..").UnregisteredSessionRecord;
|
|
733
665
|
};
|
|
734
|
-
readonly absoluteAuthStatus: {
|
|
735
|
-
error: {
|
|
736
|
-
readonly code: "Bad Request";
|
|
737
|
-
readonly message: "Cookies are missing";
|
|
738
|
-
};
|
|
739
|
-
user: null;
|
|
740
|
-
impersonator?: undefined;
|
|
741
|
-
} | {
|
|
742
|
-
error: null;
|
|
743
|
-
impersonator: import("..").Impersonator | undefined;
|
|
744
|
-
user: NonNullable<UserType> | null;
|
|
745
|
-
};
|
|
746
666
|
readonly authPrincipal: import("..").AuthPrincipal<UserType> | undefined;
|
|
747
|
-
readonly protectRoute: {
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
}) => AuthFailReturn) | undefined): Promise<(import("elysia").ElysiaStatus<"Bad Request", "Cookies are missing", 400> | import("elysia").ElysiaStatus<"Unauthorized", "User is not authenticated", 401>) | AuthReturn | Awaited<AuthFailReturn>>;
|
|
755
|
-
<AuthReturn, AuthFailReturn_1 = never>(handleAuth: (user: UserType) => AuthReturn, handleAuthFail?: ((error: {
|
|
756
|
-
readonly code: "Bad Request";
|
|
757
|
-
readonly message: "Cookies are missing";
|
|
758
|
-
} | {
|
|
759
|
-
readonly code: "Unauthorized";
|
|
760
|
-
readonly message: "User is not authenticated";
|
|
761
|
-
}) => AuthFailReturn_1) | undefined): Promise<(import("elysia").ElysiaStatus<"Bad Request", "Cookies are missing", 400> | import("elysia").ElysiaStatus<"Unauthorized", "User is not authenticated", 401>) | AuthReturn | Awaited<AuthFailReturn_1>>;
|
|
762
|
-
};
|
|
667
|
+
readonly protectRoute: <AuthReturn, AuthFailReturn = never>(handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
668
|
+
readonly code: "Bad Request";
|
|
669
|
+
readonly message: "Cookies are missing";
|
|
670
|
+
} | {
|
|
671
|
+
readonly code: "Unauthorized";
|
|
672
|
+
readonly message: "User is not authenticated";
|
|
673
|
+
}) => AuthFailReturn) | undefined) => import("elysia").ElysiaStatus<"Unauthorized", "User is not authenticated", 401> | import("elysia").ElysiaStatus<"Bad Request", "Cookies are missing", 400> | AuthReturn | Promise<AuthReturn> | NonNullable<AuthFailReturn>;
|
|
763
674
|
}) => Promise<Response>>;
|