@absolutejs/auth 0.56.10 → 0.56.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/dist/authContext.d.ts +3 -3
- package/dist/htmx/configuredRoutes.d.ts +10 -10
- package/dist/htmx/routes.d.ts +10 -10
- package/dist/index.d.ts +16 -16
- package/dist/index.js +3 -2
- package/dist/index.js.map +4 -4
- package/dist/routes/protectRoute.d.ts +2 -2
- package/dist/server.js +3 -2
- package/dist/server.js.map +4 -4
- package/package.json +1 -1
package/dist/authContext.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export declare const createAuthContext: <UserType>({ agentAuth, authSessionStore
|
|
|
16
16
|
unregisteredSession: import("./types").UnregisteredSessionRecord;
|
|
17
17
|
};
|
|
18
18
|
derive: ({
|
|
19
|
-
readonly protectRoute: <AuthReturn, AuthFailReturn>(handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
19
|
+
readonly protectRoute: <AuthReturn, AuthFailReturn = never>(handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
20
20
|
readonly code: "Bad Request";
|
|
21
21
|
readonly message: "Cookies are missing";
|
|
22
22
|
} | {
|
|
@@ -34,7 +34,7 @@ export declare const createAuthContext: <UserType>({ agentAuth, authSessionStore
|
|
|
34
34
|
message: "Agent is not authenticated" | "Insufficient agent scopes";
|
|
35
35
|
}) => AuthFailReturn_2 | Promise<AuthFailReturn_2>) => Promise<Response | AuthReturn | NonNullable<Awaited<AuthFailReturn_2>>>;
|
|
36
36
|
}) | ({
|
|
37
|
-
readonly protectRoute: <AuthReturn, AuthFailReturn>(handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
37
|
+
readonly protectRoute: <AuthReturn, AuthFailReturn = never>(handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
38
38
|
readonly code: "Bad Request";
|
|
39
39
|
readonly message: "Cookies are missing";
|
|
40
40
|
} | {
|
|
@@ -88,7 +88,7 @@ export declare const createAuthContext: <UserType>({ agentAuth, authSessionStore
|
|
|
88
88
|
macroFn: {};
|
|
89
89
|
parser: {};
|
|
90
90
|
response: import("elysia").ExtractErrorFromHandle<{
|
|
91
|
-
readonly protectRoute: <AuthReturn, AuthFailReturn>(handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
91
|
+
readonly protectRoute: <AuthReturn, AuthFailReturn = never>(handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
92
92
|
readonly code: "Bad Request";
|
|
93
93
|
readonly message: "Cookies are missing";
|
|
94
94
|
} | {
|
|
@@ -38,7 +38,7 @@ export declare const createConfiguredAuthHtmxRoutes: <UserType>({ authSessionSto
|
|
|
38
38
|
unregisteredSession: import("..").UnregisteredSessionRecord;
|
|
39
39
|
};
|
|
40
40
|
derive: {
|
|
41
|
-
readonly protectRoute: <AuthReturn, AuthFailReturn>(handleAuth: (user: AuthHtmxUser) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
41
|
+
readonly protectRoute: <AuthReturn, AuthFailReturn = never>(handleAuth: (user: AuthHtmxUser) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
42
42
|
readonly code: "Bad Request";
|
|
43
43
|
readonly message: "Cookies are missing";
|
|
44
44
|
} | {
|
|
@@ -68,7 +68,7 @@ export declare const createConfiguredAuthHtmxRoutes: <UserType>({ authSessionSto
|
|
|
68
68
|
macroFn: {};
|
|
69
69
|
parser: {};
|
|
70
70
|
response: import("elysia").ExtractErrorFromHandle<{
|
|
71
|
-
readonly protectRoute: <AuthReturn, AuthFailReturn>(handleAuth: (user: AuthHtmxUser) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
71
|
+
readonly protectRoute: <AuthReturn, AuthFailReturn = never>(handleAuth: (user: AuthHtmxUser) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
72
72
|
readonly code: "Bad Request";
|
|
73
73
|
readonly message: "Cookies are missing";
|
|
74
74
|
} | {
|
|
@@ -231,7 +231,7 @@ export declare const createConfiguredAuthHtmxRoutes: <UserType>({ authSessionSto
|
|
|
231
231
|
response: {
|
|
232
232
|
400: "Cookies are missing";
|
|
233
233
|
401: "User is not authenticated";
|
|
234
|
-
200:
|
|
234
|
+
200: Response;
|
|
235
235
|
422: {
|
|
236
236
|
type: "validation";
|
|
237
237
|
on: string;
|
|
@@ -260,7 +260,7 @@ export declare const createConfiguredAuthHtmxRoutes: <UserType>({ authSessionSto
|
|
|
260
260
|
response: {
|
|
261
261
|
400: "Cookies are missing";
|
|
262
262
|
401: "User is not authenticated";
|
|
263
|
-
200:
|
|
263
|
+
200: Response;
|
|
264
264
|
422: {
|
|
265
265
|
type: "validation";
|
|
266
266
|
on: string;
|
|
@@ -290,7 +290,7 @@ export declare const createConfiguredAuthHtmxRoutes: <UserType>({ authSessionSto
|
|
|
290
290
|
response: {
|
|
291
291
|
400: "Cookies are missing";
|
|
292
292
|
401: "User is not authenticated";
|
|
293
|
-
200:
|
|
293
|
+
200: Response;
|
|
294
294
|
422: {
|
|
295
295
|
type: "validation";
|
|
296
296
|
on: string;
|
|
@@ -319,7 +319,7 @@ export declare const createConfiguredAuthHtmxRoutes: <UserType>({ authSessionSto
|
|
|
319
319
|
response: {
|
|
320
320
|
400: "Cookies are missing";
|
|
321
321
|
401: "User is not authenticated";
|
|
322
|
-
200:
|
|
322
|
+
200: Response;
|
|
323
323
|
422: {
|
|
324
324
|
type: "validation";
|
|
325
325
|
on: string;
|
|
@@ -348,7 +348,7 @@ export declare const createConfiguredAuthHtmxRoutes: <UserType>({ authSessionSto
|
|
|
348
348
|
response: {
|
|
349
349
|
400: "Cookies are missing";
|
|
350
350
|
401: "User is not authenticated";
|
|
351
|
-
200:
|
|
351
|
+
200: Response;
|
|
352
352
|
422: {
|
|
353
353
|
type: "validation";
|
|
354
354
|
on: string;
|
|
@@ -403,7 +403,7 @@ export declare const createConfiguredAuthHtmxRoutes: <UserType>({ authSessionSto
|
|
|
403
403
|
response: {
|
|
404
404
|
400: "Cookies are missing";
|
|
405
405
|
401: "User is not authenticated";
|
|
406
|
-
200:
|
|
406
|
+
200: Response;
|
|
407
407
|
422: {
|
|
408
408
|
type: "validation";
|
|
409
409
|
on: string;
|
|
@@ -434,7 +434,7 @@ export declare const createConfiguredAuthHtmxRoutes: <UserType>({ authSessionSto
|
|
|
434
434
|
response: {
|
|
435
435
|
400: "Cookies are missing";
|
|
436
436
|
401: "User is not authenticated";
|
|
437
|
-
200:
|
|
437
|
+
200: Response;
|
|
438
438
|
422: {
|
|
439
439
|
type: "validation";
|
|
440
440
|
on: string;
|
|
@@ -484,7 +484,7 @@ export declare const createConfiguredAuthHtmxRoutes: <UserType>({ authSessionSto
|
|
|
484
484
|
response: {
|
|
485
485
|
400: "Cookies are missing";
|
|
486
486
|
401: "User is not authenticated";
|
|
487
|
-
200:
|
|
487
|
+
200: Response;
|
|
488
488
|
422: {
|
|
489
489
|
type: "validation";
|
|
490
490
|
on: string;
|
package/dist/htmx/routes.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export declare const createAuthHtmxRoutes: <UserType extends AuthHtmxUser>(confi
|
|
|
10
10
|
unregisteredSession: import("..").UnregisteredSessionRecord;
|
|
11
11
|
};
|
|
12
12
|
derive: {
|
|
13
|
-
readonly protectRoute: <AuthReturn, AuthFailReturn>(handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
13
|
+
readonly protectRoute: <AuthReturn, AuthFailReturn = never>(handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
14
14
|
readonly code: "Bad Request";
|
|
15
15
|
readonly message: "Cookies are missing";
|
|
16
16
|
} | {
|
|
@@ -40,7 +40,7 @@ export declare const createAuthHtmxRoutes: <UserType extends AuthHtmxUser>(confi
|
|
|
40
40
|
macroFn: {};
|
|
41
41
|
parser: {};
|
|
42
42
|
response: import("elysia").ExtractErrorFromHandle<{
|
|
43
|
-
readonly protectRoute: <AuthReturn, AuthFailReturn>(handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
43
|
+
readonly protectRoute: <AuthReturn, AuthFailReturn = never>(handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
44
44
|
readonly code: "Bad Request";
|
|
45
45
|
readonly message: "Cookies are missing";
|
|
46
46
|
} | {
|
|
@@ -203,7 +203,7 @@ export declare const createAuthHtmxRoutes: <UserType extends AuthHtmxUser>(confi
|
|
|
203
203
|
response: {
|
|
204
204
|
400: "Cookies are missing";
|
|
205
205
|
401: "User is not authenticated";
|
|
206
|
-
200:
|
|
206
|
+
200: Response;
|
|
207
207
|
422: {
|
|
208
208
|
type: "validation";
|
|
209
209
|
on: string;
|
|
@@ -232,7 +232,7 @@ export declare const createAuthHtmxRoutes: <UserType extends AuthHtmxUser>(confi
|
|
|
232
232
|
response: {
|
|
233
233
|
400: "Cookies are missing";
|
|
234
234
|
401: "User is not authenticated";
|
|
235
|
-
200:
|
|
235
|
+
200: Response;
|
|
236
236
|
422: {
|
|
237
237
|
type: "validation";
|
|
238
238
|
on: string;
|
|
@@ -262,7 +262,7 @@ export declare const createAuthHtmxRoutes: <UserType extends AuthHtmxUser>(confi
|
|
|
262
262
|
response: {
|
|
263
263
|
400: "Cookies are missing";
|
|
264
264
|
401: "User is not authenticated";
|
|
265
|
-
200:
|
|
265
|
+
200: Response;
|
|
266
266
|
422: {
|
|
267
267
|
type: "validation";
|
|
268
268
|
on: string;
|
|
@@ -291,7 +291,7 @@ export declare const createAuthHtmxRoutes: <UserType extends AuthHtmxUser>(confi
|
|
|
291
291
|
response: {
|
|
292
292
|
400: "Cookies are missing";
|
|
293
293
|
401: "User is not authenticated";
|
|
294
|
-
200:
|
|
294
|
+
200: Response;
|
|
295
295
|
422: {
|
|
296
296
|
type: "validation";
|
|
297
297
|
on: string;
|
|
@@ -320,7 +320,7 @@ export declare const createAuthHtmxRoutes: <UserType extends AuthHtmxUser>(confi
|
|
|
320
320
|
response: {
|
|
321
321
|
400: "Cookies are missing";
|
|
322
322
|
401: "User is not authenticated";
|
|
323
|
-
200:
|
|
323
|
+
200: Response;
|
|
324
324
|
422: {
|
|
325
325
|
type: "validation";
|
|
326
326
|
on: string;
|
|
@@ -375,7 +375,7 @@ export declare const createAuthHtmxRoutes: <UserType extends AuthHtmxUser>(confi
|
|
|
375
375
|
response: {
|
|
376
376
|
400: "Cookies are missing";
|
|
377
377
|
401: "User is not authenticated";
|
|
378
|
-
200:
|
|
378
|
+
200: Response;
|
|
379
379
|
422: {
|
|
380
380
|
type: "validation";
|
|
381
381
|
on: string;
|
|
@@ -406,7 +406,7 @@ export declare const createAuthHtmxRoutes: <UserType extends AuthHtmxUser>(confi
|
|
|
406
406
|
response: {
|
|
407
407
|
400: "Cookies are missing";
|
|
408
408
|
401: "User is not authenticated";
|
|
409
|
-
200:
|
|
409
|
+
200: Response;
|
|
410
410
|
422: {
|
|
411
411
|
type: "validation";
|
|
412
412
|
on: string;
|
|
@@ -456,7 +456,7 @@ export declare const createAuthHtmxRoutes: <UserType extends AuthHtmxUser>(confi
|
|
|
456
456
|
response: {
|
|
457
457
|
400: "Cookies are missing";
|
|
458
458
|
401: "User is not authenticated";
|
|
459
|
-
200:
|
|
459
|
+
200: Response;
|
|
460
460
|
422: {
|
|
461
461
|
type: "validation";
|
|
462
462
|
on: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export declare const auth: <UserType>(configuration: AuthConfig<UserType>) => Pr
|
|
|
7
7
|
unregisteredSession: import("./types").UnregisteredSessionRecord;
|
|
8
8
|
};
|
|
9
9
|
derive: ({
|
|
10
|
-
readonly protectRoute: <AuthReturn, AuthFailReturn>(handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
10
|
+
readonly protectRoute: <AuthReturn, AuthFailReturn = never>(handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
11
11
|
readonly code: "Bad Request";
|
|
12
12
|
readonly message: "Cookies are missing";
|
|
13
13
|
} | {
|
|
@@ -25,7 +25,7 @@ export declare const auth: <UserType>(configuration: AuthConfig<UserType>) => Pr
|
|
|
25
25
|
message: "Agent is not authenticated" | "Insufficient agent scopes";
|
|
26
26
|
}) => AuthFailReturn_2 | Promise<AuthFailReturn_2>) => Promise<Response | AuthReturn | NonNullable<Awaited<AuthFailReturn_2>>>;
|
|
27
27
|
}) | ({
|
|
28
|
-
readonly protectRoute: <AuthReturn, AuthFailReturn>(handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
28
|
+
readonly protectRoute: <AuthReturn, AuthFailReturn = never>(handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
29
29
|
readonly code: "Bad Request";
|
|
30
30
|
readonly message: "Cookies are missing";
|
|
31
31
|
} | {
|
|
@@ -86,7 +86,7 @@ export declare const auth: <UserType>(configuration: AuthConfig<UserType>) => Pr
|
|
|
86
86
|
macroFn: {};
|
|
87
87
|
parser: {};
|
|
88
88
|
response: import("elysia").ExtractErrorFromHandle<{
|
|
89
|
-
readonly protectRoute: <AuthReturn, AuthFailReturn>(handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
89
|
+
readonly protectRoute: <AuthReturn, AuthFailReturn = never>(handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
90
90
|
readonly code: "Bad Request";
|
|
91
91
|
readonly message: "Cookies are missing";
|
|
92
92
|
} | {
|
|
@@ -178,7 +178,7 @@ export declare const createAuthApplications: <UserType>(configuration: AuthConfi
|
|
|
178
178
|
unregisteredSession: import("./types").UnregisteredSessionRecord;
|
|
179
179
|
};
|
|
180
180
|
derive: ({
|
|
181
|
-
readonly protectRoute: <AuthReturn, AuthFailReturn>(handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
181
|
+
readonly protectRoute: <AuthReturn, AuthFailReturn = never>(handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
182
182
|
readonly code: "Bad Request";
|
|
183
183
|
readonly message: "Cookies are missing";
|
|
184
184
|
} | {
|
|
@@ -196,7 +196,7 @@ export declare const createAuthApplications: <UserType>(configuration: AuthConfi
|
|
|
196
196
|
message: "Agent is not authenticated" | "Insufficient agent scopes";
|
|
197
197
|
}) => AuthFailReturn_2 | Promise<AuthFailReturn_2>) => Promise<Response | AuthReturn | NonNullable<Awaited<AuthFailReturn_2>>>;
|
|
198
198
|
}) | ({
|
|
199
|
-
readonly protectRoute: <AuthReturn, AuthFailReturn>(handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
199
|
+
readonly protectRoute: <AuthReturn, AuthFailReturn = never>(handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
200
200
|
readonly code: "Bad Request";
|
|
201
201
|
readonly message: "Cookies are missing";
|
|
202
202
|
} | {
|
|
@@ -250,7 +250,7 @@ export declare const createAuthApplications: <UserType>(configuration: AuthConfi
|
|
|
250
250
|
macroFn: {};
|
|
251
251
|
parser: {};
|
|
252
252
|
response: import("elysia").ExtractErrorFromHandle<{
|
|
253
|
-
readonly protectRoute: <AuthReturn, AuthFailReturn>(handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
253
|
+
readonly protectRoute: <AuthReturn, AuthFailReturn = never>(handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
254
254
|
readonly code: "Bad Request";
|
|
255
255
|
readonly message: "Cookies are missing";
|
|
256
256
|
} | {
|
|
@@ -665,7 +665,7 @@ export declare const createAuthApplications: <UserType>(configuration: AuthConfi
|
|
|
665
665
|
unregisteredSession: import("./types").UnregisteredSessionRecord;
|
|
666
666
|
};
|
|
667
667
|
derive: {} | {
|
|
668
|
-
readonly protectRoute: <AuthReturn, AuthFailReturn>(handleAuth: (user: import(".").AuthHtmxUser) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
668
|
+
readonly protectRoute: <AuthReturn, AuthFailReturn = never>(handleAuth: (user: import(".").AuthHtmxUser) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
669
669
|
readonly code: "Bad Request";
|
|
670
670
|
readonly message: "Cookies are missing";
|
|
671
671
|
} | {
|
|
@@ -719,7 +719,7 @@ export declare const createAuthApplications: <UserType>(configuration: AuthConfi
|
|
|
719
719
|
macroFn: {};
|
|
720
720
|
parser: {};
|
|
721
721
|
response: import("elysia").ExtractErrorFromHandle<{
|
|
722
|
-
readonly protectRoute: <AuthReturn, AuthFailReturn>(handleAuth: (user: import(".").AuthHtmxUser) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
722
|
+
readonly protectRoute: <AuthReturn, AuthFailReturn = never>(handleAuth: (user: import(".").AuthHtmxUser) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
723
723
|
readonly code: "Bad Request";
|
|
724
724
|
readonly message: "Cookies are missing";
|
|
725
725
|
} | {
|
|
@@ -3027,7 +3027,7 @@ export declare const createAuthApplications: <UserType>(configuration: AuthConfi
|
|
|
3027
3027
|
response: {
|
|
3028
3028
|
400: "Cookies are missing";
|
|
3029
3029
|
401: "User is not authenticated";
|
|
3030
|
-
200:
|
|
3030
|
+
200: Response;
|
|
3031
3031
|
422: {
|
|
3032
3032
|
type: "validation";
|
|
3033
3033
|
on: string;
|
|
@@ -3056,7 +3056,7 @@ export declare const createAuthApplications: <UserType>(configuration: AuthConfi
|
|
|
3056
3056
|
response: {
|
|
3057
3057
|
400: "Cookies are missing";
|
|
3058
3058
|
401: "User is not authenticated";
|
|
3059
|
-
200:
|
|
3059
|
+
200: Response;
|
|
3060
3060
|
422: {
|
|
3061
3061
|
type: "validation";
|
|
3062
3062
|
on: string;
|
|
@@ -3086,7 +3086,7 @@ export declare const createAuthApplications: <UserType>(configuration: AuthConfi
|
|
|
3086
3086
|
response: {
|
|
3087
3087
|
400: "Cookies are missing";
|
|
3088
3088
|
401: "User is not authenticated";
|
|
3089
|
-
200:
|
|
3089
|
+
200: Response;
|
|
3090
3090
|
422: {
|
|
3091
3091
|
type: "validation";
|
|
3092
3092
|
on: string;
|
|
@@ -3115,7 +3115,7 @@ export declare const createAuthApplications: <UserType>(configuration: AuthConfi
|
|
|
3115
3115
|
response: {
|
|
3116
3116
|
400: "Cookies are missing";
|
|
3117
3117
|
401: "User is not authenticated";
|
|
3118
|
-
200:
|
|
3118
|
+
200: Response;
|
|
3119
3119
|
422: {
|
|
3120
3120
|
type: "validation";
|
|
3121
3121
|
on: string;
|
|
@@ -3144,7 +3144,7 @@ export declare const createAuthApplications: <UserType>(configuration: AuthConfi
|
|
|
3144
3144
|
response: {
|
|
3145
3145
|
400: "Cookies are missing";
|
|
3146
3146
|
401: "User is not authenticated";
|
|
3147
|
-
200:
|
|
3147
|
+
200: Response;
|
|
3148
3148
|
422: {
|
|
3149
3149
|
type: "validation";
|
|
3150
3150
|
on: string;
|
|
@@ -3199,7 +3199,7 @@ export declare const createAuthApplications: <UserType>(configuration: AuthConfi
|
|
|
3199
3199
|
response: {
|
|
3200
3200
|
400: "Cookies are missing";
|
|
3201
3201
|
401: "User is not authenticated";
|
|
3202
|
-
200:
|
|
3202
|
+
200: Response;
|
|
3203
3203
|
422: {
|
|
3204
3204
|
type: "validation";
|
|
3205
3205
|
on: string;
|
|
@@ -3230,7 +3230,7 @@ export declare const createAuthApplications: <UserType>(configuration: AuthConfi
|
|
|
3230
3230
|
response: {
|
|
3231
3231
|
400: "Cookies are missing";
|
|
3232
3232
|
401: "User is not authenticated";
|
|
3233
|
-
200:
|
|
3233
|
+
200: Response;
|
|
3234
3234
|
422: {
|
|
3235
3235
|
type: "validation";
|
|
3236
3236
|
on: string;
|
|
@@ -3280,7 +3280,7 @@ export declare const createAuthApplications: <UserType>(configuration: AuthConfi
|
|
|
3280
3280
|
response: {
|
|
3281
3281
|
400: "Cookies are missing";
|
|
3282
3282
|
401: "User is not authenticated";
|
|
3283
|
-
200:
|
|
3283
|
+
200: Response;
|
|
3284
3284
|
422: {
|
|
3285
3285
|
type: "validation";
|
|
3286
3286
|
on: string;
|
package/dist/index.js
CHANGED
|
@@ -30248,11 +30248,12 @@ var delegateAgentAuthorization = async (agentAuth, context, auditEmit) => {
|
|
|
30248
30248
|
now,
|
|
30249
30249
|
userId: context.userSub
|
|
30250
30250
|
});
|
|
30251
|
+
const grantedScopes2 = context.scopes.filter((scope) => registration2.allowedScopes.includes(scope) && agentAuth.scopes.includes(scope));
|
|
30251
30252
|
await agentAuth.delegationStore.saveDelegation({
|
|
30252
30253
|
agentId: registration2.agentId,
|
|
30253
30254
|
createdAt: existing?.createdAt ?? now,
|
|
30254
30255
|
delegationId: existing?.delegationId ?? `agd_${crypto.randomUUID()}`,
|
|
30255
|
-
scopes:
|
|
30256
|
+
scopes: [...new Set([...existing?.scopes ?? [], ...grantedScopes2])],
|
|
30256
30257
|
status: "active",
|
|
30257
30258
|
updatedAt: now,
|
|
30258
30259
|
userId: context.userSub
|
|
@@ -31056,5 +31057,5 @@ export {
|
|
|
31056
31057
|
AGENT_CLAIM_GRANT_TYPE
|
|
31057
31058
|
};
|
|
31058
31059
|
|
|
31059
|
-
//# debugId=
|
|
31060
|
+
//# debugId=CEE9F9BEA5B2A4F264756E2164756E21
|
|
31060
31061
|
//# sourceMappingURL=index.js.map
|