@absolutejs/auth 0.76.3 → 0.77.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 +6 -2
- package/dist/agents/index.js +6 -5
- package/dist/agents/index.js.map +4 -4
- package/dist/agents/routes.d.ts +10 -4
- package/dist/authContext.d.ts +178 -66
- package/dist/authorization/protectPermission.d.ts +8 -3
- package/dist/cli/migrate.js +14 -7
- package/dist/cli/migrate.js.map +4 -4
- package/dist/htmx/configuredRoutes.d.ts +126 -37
- package/dist/htmx/routes.d.ts +126 -37
- package/dist/index.d.ts +429 -159
- package/dist/index.js +76 -54
- package/dist/index.js.map +16 -16
- package/dist/linkedProviders/index.d.ts +3 -1
- package/dist/linkedProviders/index.js +11983 -8
- package/dist/linkedProviders/index.js.map +103 -5
- package/dist/linkedProviders/neonStores.d.ts +8 -2
- package/dist/linkedProviders/resolver.d.ts +16 -1
- package/dist/oidc/index.js.map +2 -2
- package/dist/routes/protectRoute.d.ts +21 -4
- package/dist/routes/stepUp.d.ts +8 -3
- package/dist/server.js +72 -54
- package/dist/server.js.map +16 -16
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -9,54 +9,134 @@ export declare const auth: <UserType>(configuration: AuthConfig<UserType>) => Pr
|
|
|
9
9
|
unregisteredSession: import("./types").UnregisteredSessionRecord;
|
|
10
10
|
};
|
|
11
11
|
derive: ({
|
|
12
|
-
readonly
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
readonly absoluteAuthStatus: {
|
|
13
|
+
error: {
|
|
14
|
+
readonly code: "Bad Request";
|
|
15
|
+
readonly message: "Cookies are missing";
|
|
16
|
+
};
|
|
17
|
+
user: null;
|
|
18
|
+
impersonator?: undefined;
|
|
16
19
|
} | {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
+
error: null;
|
|
21
|
+
impersonator: import("./types").Impersonator | undefined;
|
|
22
|
+
user: NonNullable<UserType> | null;
|
|
23
|
+
};
|
|
24
|
+
readonly authPrincipal: import("./principal").AuthPrincipal<UserType> | undefined;
|
|
25
|
+
} & {
|
|
26
|
+
readonly protectRoute: {
|
|
27
|
+
<AuthReturn, AuthFailReturn = never>(handleAuth: (user: UserType) => Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
28
|
+
readonly code: "Bad Request";
|
|
29
|
+
readonly message: "Cookies are missing";
|
|
30
|
+
} | {
|
|
31
|
+
readonly code: "Unauthorized";
|
|
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
|
+
};
|
|
20
42
|
} & {
|
|
21
|
-
readonly requireRecentAuth:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
43
|
+
readonly requireRecentAuth: {
|
|
44
|
+
<AuthReturn, AuthFailReturn_2 = never>(maxAgeMs: number, handleAuth: (user: UserType) => Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
45
|
+
readonly code: "Unauthorized";
|
|
46
|
+
readonly message: "Recent authentication required";
|
|
47
|
+
}) => AuthFailReturn_2) | undefined): Promise<import("elysia").ElysiaStatus<"Unauthorized", "Recent authentication required", 401> | AuthReturn | Awaited<AuthFailReturn_2>>;
|
|
48
|
+
<AuthReturn, AuthFailReturn_3 = never>(maxAgeMs: number, handleAuth: (user: UserType) => AuthReturn, handleAuthFail?: ((error: {
|
|
49
|
+
readonly code: "Unauthorized";
|
|
50
|
+
readonly message: "Recent authentication required";
|
|
51
|
+
}) => AuthFailReturn_3) | undefined): Promise<import("elysia").ElysiaStatus<"Unauthorized", "Recent authentication required", 401> | AuthReturn | Awaited<AuthFailReturn_3>>;
|
|
52
|
+
};
|
|
25
53
|
} & {
|
|
26
|
-
readonly protectAgent:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
54
|
+
readonly protectAgent: {
|
|
55
|
+
<AuthReturn, AuthFailReturn_4 = never>(requiredScopes: string[], handleAuth: (principal: import(".").AgentPrincipal) => Promise<AuthReturn>, handleAuthFail?: (error: {
|
|
56
|
+
code: "Forbidden" | "Unauthorized";
|
|
57
|
+
message: "Agent is not authenticated" | "Insufficient agent scopes";
|
|
58
|
+
}) => AuthFailReturn_4): Promise<Response | AuthReturn | Awaited<AuthFailReturn_4>>;
|
|
59
|
+
<AuthReturn, AuthFailReturn_5 = never>(requiredScopes: string[], handleAuth: (principal: import(".").AgentPrincipal) => AuthReturn, handleAuthFail?: (error: {
|
|
60
|
+
code: "Forbidden" | "Unauthorized";
|
|
61
|
+
message: "Agent is not authenticated" | "Insufficient agent scopes";
|
|
62
|
+
}) => AuthFailReturn_5): Promise<Response | AuthReturn | Awaited<AuthFailReturn_5>>;
|
|
63
|
+
};
|
|
30
64
|
}) | ({
|
|
31
|
-
readonly
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
65
|
+
readonly absoluteAuthStatus: {
|
|
66
|
+
error: {
|
|
67
|
+
readonly code: "Bad Request";
|
|
68
|
+
readonly message: "Cookies are missing";
|
|
69
|
+
};
|
|
70
|
+
user: null;
|
|
71
|
+
impersonator?: undefined;
|
|
35
72
|
} | {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
73
|
+
error: null;
|
|
74
|
+
impersonator: import("./types").Impersonator | undefined;
|
|
75
|
+
user: NonNullable<UserType> | null;
|
|
76
|
+
};
|
|
77
|
+
readonly authPrincipal: import("./principal").AuthPrincipal<UserType> | undefined;
|
|
39
78
|
} & {
|
|
40
|
-
readonly
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
79
|
+
readonly protectRoute: {
|
|
80
|
+
<AuthReturn, AuthFailReturn = never>(handleAuth: (user: UserType) => Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
81
|
+
readonly code: "Bad Request";
|
|
82
|
+
readonly message: "Cookies are missing";
|
|
83
|
+
} | {
|
|
84
|
+
readonly code: "Unauthorized";
|
|
85
|
+
readonly message: "User is not authenticated";
|
|
86
|
+
}) => AuthFailReturn) | undefined): Promise<(import("elysia").ElysiaStatus<"Bad Request", "Cookies are missing", 400> | import("elysia").ElysiaStatus<"Unauthorized", "User is not authenticated", 401>) | AuthReturn | Awaited<AuthFailReturn>>;
|
|
87
|
+
<AuthReturn, AuthFailReturn_1 = never>(handleAuth: (user: UserType) => AuthReturn, handleAuthFail?: ((error: {
|
|
88
|
+
readonly code: "Bad Request";
|
|
89
|
+
readonly message: "Cookies are missing";
|
|
90
|
+
} | {
|
|
91
|
+
readonly code: "Unauthorized";
|
|
92
|
+
readonly message: "User is not authenticated";
|
|
93
|
+
}) => 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>>;
|
|
94
|
+
};
|
|
44
95
|
} & {
|
|
45
|
-
readonly
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
96
|
+
readonly requireRecentAuth: {
|
|
97
|
+
<AuthReturn, AuthFailReturn_2 = never>(maxAgeMs: number, handleAuth: (user: UserType) => Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
98
|
+
readonly code: "Unauthorized";
|
|
99
|
+
readonly message: "Recent authentication required";
|
|
100
|
+
}) => AuthFailReturn_2) | undefined): Promise<import("elysia").ElysiaStatus<"Unauthorized", "Recent authentication required", 401> | AuthReturn | Awaited<AuthFailReturn_2>>;
|
|
101
|
+
<AuthReturn, AuthFailReturn_3 = never>(maxAgeMs: number, handleAuth: (user: UserType) => AuthReturn, handleAuthFail?: ((error: {
|
|
102
|
+
readonly code: "Unauthorized";
|
|
103
|
+
readonly message: "Recent authentication required";
|
|
104
|
+
}) => AuthFailReturn_3) | undefined): Promise<import("elysia").ElysiaStatus<"Unauthorized", "Recent authentication required", 401> | AuthReturn | Awaited<AuthFailReturn_3>>;
|
|
105
|
+
};
|
|
55
106
|
} & {
|
|
56
|
-
readonly
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
107
|
+
readonly protectPermission: {
|
|
108
|
+
<AuthReturn, AuthFailReturn_6 = never>(check: import(".").PermissionCheck, handleAuth: (user: UserType) => Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
109
|
+
readonly code: "Bad Request";
|
|
110
|
+
readonly message: "Cookies are missing";
|
|
111
|
+
} | {
|
|
112
|
+
readonly code: "Forbidden";
|
|
113
|
+
readonly message: "Insufficient permissions";
|
|
114
|
+
} | {
|
|
115
|
+
readonly code: "Unauthorized";
|
|
116
|
+
readonly message: "User is not authenticated";
|
|
117
|
+
}) => AuthFailReturn_6) | undefined): Promise<(import("elysia").ElysiaStatus<"Bad Request", "Cookies are missing", 400> | import("elysia").ElysiaStatus<"Forbidden", "Insufficient permissions", 403> | import("elysia").ElysiaStatus<"Unauthorized", "User is not authenticated", 401>) | AuthReturn | Awaited<AuthFailReturn_6>>;
|
|
118
|
+
<AuthReturn, AuthFailReturn_7 = never>(check: import(".").PermissionCheck, handleAuth: (user: UserType) => AuthReturn, handleAuthFail?: ((error: {
|
|
119
|
+
readonly code: "Bad Request";
|
|
120
|
+
readonly message: "Cookies are missing";
|
|
121
|
+
} | {
|
|
122
|
+
readonly code: "Forbidden";
|
|
123
|
+
readonly message: "Insufficient permissions";
|
|
124
|
+
} | {
|
|
125
|
+
readonly code: "Unauthorized";
|
|
126
|
+
readonly message: "User is not authenticated";
|
|
127
|
+
}) => AuthFailReturn_7) | undefined): Promise<(import("elysia").ElysiaStatus<"Bad Request", "Cookies are missing", 400> | import("elysia").ElysiaStatus<"Forbidden", "Insufficient permissions", 403> | import("elysia").ElysiaStatus<"Unauthorized", "User is not authenticated", 401>) | AuthReturn | Awaited<AuthFailReturn_7>>;
|
|
128
|
+
};
|
|
129
|
+
} & {
|
|
130
|
+
readonly protectAgent: {
|
|
131
|
+
<AuthReturn, AuthFailReturn_4 = never>(requiredScopes: string[], handleAuth: (principal: import(".").AgentPrincipal) => Promise<AuthReturn>, handleAuthFail?: (error: {
|
|
132
|
+
code: "Forbidden" | "Unauthorized";
|
|
133
|
+
message: "Agent is not authenticated" | "Insufficient agent scopes";
|
|
134
|
+
}) => AuthFailReturn_4): Promise<Response | AuthReturn | Awaited<AuthFailReturn_4>>;
|
|
135
|
+
<AuthReturn, AuthFailReturn_5 = never>(requiredScopes: string[], handleAuth: (principal: import(".").AgentPrincipal) => AuthReturn, handleAuthFail?: (error: {
|
|
136
|
+
code: "Forbidden" | "Unauthorized";
|
|
137
|
+
message: "Agent is not authenticated" | "Insufficient agent scopes";
|
|
138
|
+
}) => AuthFailReturn_5): Promise<Response | AuthReturn | Awaited<AuthFailReturn_5>>;
|
|
139
|
+
};
|
|
60
140
|
});
|
|
61
141
|
}, {
|
|
62
142
|
typebox: {};
|
|
@@ -80,14 +160,22 @@ export declare const auth: <UserType>(configuration: AuthConfig<UserType>) => Pr
|
|
|
80
160
|
macroFn: {};
|
|
81
161
|
parser: {};
|
|
82
162
|
response: import("elysia/types").ExtractErrorFromHandle<{
|
|
83
|
-
readonly
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
163
|
+
readonly protectRoute: {
|
|
164
|
+
<AuthReturn, AuthFailReturn = never>(handleAuth: (user: UserType) => Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
165
|
+
readonly code: "Bad Request";
|
|
166
|
+
readonly message: "Cookies are missing";
|
|
167
|
+
} | {
|
|
168
|
+
readonly code: "Unauthorized";
|
|
169
|
+
readonly message: "User is not authenticated";
|
|
170
|
+
}) => AuthFailReturn) | undefined): Promise<(import("elysia").ElysiaStatus<"Bad Request", "Cookies are missing", 400> | import("elysia").ElysiaStatus<"Unauthorized", "User is not authenticated", 401>) | AuthReturn | Awaited<AuthFailReturn>>;
|
|
171
|
+
<AuthReturn, AuthFailReturn_1 = never>(handleAuth: (user: UserType) => AuthReturn, handleAuthFail?: ((error: {
|
|
172
|
+
readonly code: "Bad Request";
|
|
173
|
+
readonly message: "Cookies are missing";
|
|
174
|
+
} | {
|
|
175
|
+
readonly code: "Unauthorized";
|
|
176
|
+
readonly message: "User is not authenticated";
|
|
177
|
+
}) => 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>>;
|
|
178
|
+
};
|
|
91
179
|
}>;
|
|
92
180
|
} & ({
|
|
93
181
|
schema: {};
|
|
@@ -101,10 +189,16 @@ export declare const auth: <UserType>(configuration: AuthConfig<UserType>) => Pr
|
|
|
101
189
|
macroFn: {};
|
|
102
190
|
parser: {};
|
|
103
191
|
response: import("elysia/types").ExtractErrorFromHandle<{
|
|
104
|
-
readonly requireRecentAuth:
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
192
|
+
readonly requireRecentAuth: {
|
|
193
|
+
<AuthReturn, AuthFailReturn_2 = never>(maxAgeMs: number, handleAuth: (user: UserType) => Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
194
|
+
readonly code: "Unauthorized";
|
|
195
|
+
readonly message: "Recent authentication required";
|
|
196
|
+
}) => AuthFailReturn_2) | undefined): Promise<import("elysia").ElysiaStatus<"Unauthorized", "Recent authentication required", 401> | AuthReturn | Awaited<AuthFailReturn_2>>;
|
|
197
|
+
<AuthReturn, AuthFailReturn_3 = never>(maxAgeMs: number, handleAuth: (user: UserType) => AuthReturn, handleAuthFail?: ((error: {
|
|
198
|
+
readonly code: "Unauthorized";
|
|
199
|
+
readonly message: "Recent authentication required";
|
|
200
|
+
}) => AuthFailReturn_3) | undefined): Promise<import("elysia").ElysiaStatus<"Unauthorized", "Recent authentication required", 401> | AuthReturn | Awaited<AuthFailReturn_3>>;
|
|
201
|
+
};
|
|
108
202
|
}>;
|
|
109
203
|
} & (import("elysia/types").DefaultMetadata | {
|
|
110
204
|
schema: {};
|
|
@@ -118,16 +212,28 @@ export declare const auth: <UserType>(configuration: AuthConfig<UserType>) => Pr
|
|
|
118
212
|
macroFn: {};
|
|
119
213
|
parser: {};
|
|
120
214
|
response: import("elysia/types").ExtractErrorFromHandle<{
|
|
121
|
-
readonly protectPermission:
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
215
|
+
readonly protectPermission: {
|
|
216
|
+
<AuthReturn, AuthFailReturn_6 = never>(check: import(".").PermissionCheck, handleAuth: (user: UserType) => Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
217
|
+
readonly code: "Bad Request";
|
|
218
|
+
readonly message: "Cookies are missing";
|
|
219
|
+
} | {
|
|
220
|
+
readonly code: "Forbidden";
|
|
221
|
+
readonly message: "Insufficient permissions";
|
|
222
|
+
} | {
|
|
223
|
+
readonly code: "Unauthorized";
|
|
224
|
+
readonly message: "User is not authenticated";
|
|
225
|
+
}) => AuthFailReturn_6) | undefined): Promise<(import("elysia").ElysiaStatus<"Bad Request", "Cookies are missing", 400> | import("elysia").ElysiaStatus<"Forbidden", "Insufficient permissions", 403> | import("elysia").ElysiaStatus<"Unauthorized", "User is not authenticated", 401>) | AuthReturn | Awaited<AuthFailReturn_6>>;
|
|
226
|
+
<AuthReturn, AuthFailReturn_7 = never>(check: import(".").PermissionCheck, handleAuth: (user: UserType) => AuthReturn, handleAuthFail?: ((error: {
|
|
227
|
+
readonly code: "Bad Request";
|
|
228
|
+
readonly message: "Cookies are missing";
|
|
229
|
+
} | {
|
|
230
|
+
readonly code: "Forbidden";
|
|
231
|
+
readonly message: "Insufficient permissions";
|
|
232
|
+
} | {
|
|
233
|
+
readonly code: "Unauthorized";
|
|
234
|
+
readonly message: "User is not authenticated";
|
|
235
|
+
}) => AuthFailReturn_7) | undefined): Promise<(import("elysia").ElysiaStatus<"Bad Request", "Cookies are missing", 400> | import("elysia").ElysiaStatus<"Forbidden", "Insufficient permissions", 403> | import("elysia").ElysiaStatus<"Unauthorized", "User is not authenticated", 401>) | AuthReturn | Awaited<AuthFailReturn_7>>;
|
|
236
|
+
};
|
|
131
237
|
}>;
|
|
132
238
|
}))))) & {
|
|
133
239
|
schema: {};
|
|
@@ -136,10 +242,16 @@ export declare const auth: <UserType>(configuration: AuthConfig<UserType>) => Pr
|
|
|
136
242
|
macroFn: {};
|
|
137
243
|
parser: {};
|
|
138
244
|
response: import("elysia/types").ExtractErrorFromHandle<{
|
|
139
|
-
readonly protectAgent:
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
245
|
+
readonly protectAgent: {
|
|
246
|
+
<AuthReturn, AuthFailReturn_4 = never>(requiredScopes: string[], handleAuth: (principal: import(".").AgentPrincipal) => Promise<AuthReturn>, handleAuthFail?: (error: {
|
|
247
|
+
code: "Forbidden" | "Unauthorized";
|
|
248
|
+
message: "Agent is not authenticated" | "Insufficient agent scopes";
|
|
249
|
+
}) => AuthFailReturn_4): Promise<Response | AuthReturn | Awaited<AuthFailReturn_4>>;
|
|
250
|
+
<AuthReturn, AuthFailReturn_5 = never>(requiredScopes: string[], handleAuth: (principal: import(".").AgentPrincipal) => AuthReturn, handleAuthFail?: (error: {
|
|
251
|
+
code: "Forbidden" | "Unauthorized";
|
|
252
|
+
message: "Agent is not authenticated" | "Insufficient agent scopes";
|
|
253
|
+
}) => AuthFailReturn_5): Promise<Response | AuthReturn | Awaited<AuthFailReturn_5>>;
|
|
254
|
+
};
|
|
143
255
|
}>;
|
|
144
256
|
}), {}, import("elysia/types").DefaultEphemeral, {
|
|
145
257
|
derive: {};
|
|
@@ -159,54 +271,134 @@ export declare const createAuthApplications: <UserType>(configuration: AuthConfi
|
|
|
159
271
|
unregisteredSession: import("./types").UnregisteredSessionRecord;
|
|
160
272
|
};
|
|
161
273
|
derive: ({
|
|
162
|
-
readonly
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
274
|
+
readonly absoluteAuthStatus: {
|
|
275
|
+
error: {
|
|
276
|
+
readonly code: "Bad Request";
|
|
277
|
+
readonly message: "Cookies are missing";
|
|
278
|
+
};
|
|
279
|
+
user: null;
|
|
280
|
+
impersonator?: undefined;
|
|
166
281
|
} | {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
282
|
+
error: null;
|
|
283
|
+
impersonator: import("./types").Impersonator | undefined;
|
|
284
|
+
user: NonNullable<UserType> | null;
|
|
285
|
+
};
|
|
286
|
+
readonly authPrincipal: import("./principal").AuthPrincipal<UserType> | undefined;
|
|
170
287
|
} & {
|
|
171
|
-
readonly
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
288
|
+
readonly protectRoute: {
|
|
289
|
+
<AuthReturn, AuthFailReturn = never>(handleAuth: (user: UserType) => Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
290
|
+
readonly code: "Bad Request";
|
|
291
|
+
readonly message: "Cookies are missing";
|
|
292
|
+
} | {
|
|
293
|
+
readonly code: "Unauthorized";
|
|
294
|
+
readonly message: "User is not authenticated";
|
|
295
|
+
}) => AuthFailReturn) | undefined): Promise<(import("elysia").ElysiaStatus<"Bad Request", "Cookies are missing", 400> | import("elysia").ElysiaStatus<"Unauthorized", "User is not authenticated", 401>) | AuthReturn | Awaited<AuthFailReturn>>;
|
|
296
|
+
<AuthReturn, AuthFailReturn_1 = never>(handleAuth: (user: UserType) => AuthReturn, handleAuthFail?: ((error: {
|
|
297
|
+
readonly code: "Bad Request";
|
|
298
|
+
readonly message: "Cookies are missing";
|
|
299
|
+
} | {
|
|
300
|
+
readonly code: "Unauthorized";
|
|
301
|
+
readonly message: "User is not authenticated";
|
|
302
|
+
}) => 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>>;
|
|
303
|
+
};
|
|
175
304
|
} & {
|
|
176
|
-
readonly
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
305
|
+
readonly requireRecentAuth: {
|
|
306
|
+
<AuthReturn, AuthFailReturn_2 = never>(maxAgeMs: number, handleAuth: (user: UserType) => Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
307
|
+
readonly code: "Unauthorized";
|
|
308
|
+
readonly message: "Recent authentication required";
|
|
309
|
+
}) => AuthFailReturn_2) | undefined): Promise<import("elysia").ElysiaStatus<"Unauthorized", "Recent authentication required", 401> | AuthReturn | Awaited<AuthFailReturn_2>>;
|
|
310
|
+
<AuthReturn, AuthFailReturn_3 = never>(maxAgeMs: number, handleAuth: (user: UserType) => AuthReturn, handleAuthFail?: ((error: {
|
|
311
|
+
readonly code: "Unauthorized";
|
|
312
|
+
readonly message: "Recent authentication required";
|
|
313
|
+
}) => AuthFailReturn_3) | undefined): Promise<import("elysia").ElysiaStatus<"Unauthorized", "Recent authentication required", 401> | AuthReturn | Awaited<AuthFailReturn_3>>;
|
|
314
|
+
};
|
|
315
|
+
} & {
|
|
316
|
+
readonly protectAgent: {
|
|
317
|
+
<AuthReturn, AuthFailReturn_4 = never>(requiredScopes: string[], handleAuth: (principal: import(".").AgentPrincipal) => Promise<AuthReturn>, handleAuthFail?: (error: {
|
|
318
|
+
code: "Forbidden" | "Unauthorized";
|
|
319
|
+
message: "Agent is not authenticated" | "Insufficient agent scopes";
|
|
320
|
+
}) => AuthFailReturn_4): Promise<Response | AuthReturn | Awaited<AuthFailReturn_4>>;
|
|
321
|
+
<AuthReturn, AuthFailReturn_5 = never>(requiredScopes: string[], handleAuth: (principal: import(".").AgentPrincipal) => AuthReturn, handleAuthFail?: (error: {
|
|
322
|
+
code: "Forbidden" | "Unauthorized";
|
|
323
|
+
message: "Agent is not authenticated" | "Insufficient agent scopes";
|
|
324
|
+
}) => AuthFailReturn_5): Promise<Response | AuthReturn | Awaited<AuthFailReturn_5>>;
|
|
325
|
+
};
|
|
180
326
|
}) | ({
|
|
181
|
-
readonly
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
327
|
+
readonly absoluteAuthStatus: {
|
|
328
|
+
error: {
|
|
329
|
+
readonly code: "Bad Request";
|
|
330
|
+
readonly message: "Cookies are missing";
|
|
331
|
+
};
|
|
332
|
+
user: null;
|
|
333
|
+
impersonator?: undefined;
|
|
185
334
|
} | {
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
335
|
+
error: null;
|
|
336
|
+
impersonator: import("./types").Impersonator | undefined;
|
|
337
|
+
user: NonNullable<UserType> | null;
|
|
338
|
+
};
|
|
339
|
+
readonly authPrincipal: import("./principal").AuthPrincipal<UserType> | undefined;
|
|
189
340
|
} & {
|
|
190
|
-
readonly
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
341
|
+
readonly protectRoute: {
|
|
342
|
+
<AuthReturn, AuthFailReturn = never>(handleAuth: (user: UserType) => Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
343
|
+
readonly code: "Bad Request";
|
|
344
|
+
readonly message: "Cookies are missing";
|
|
345
|
+
} | {
|
|
346
|
+
readonly code: "Unauthorized";
|
|
347
|
+
readonly message: "User is not authenticated";
|
|
348
|
+
}) => AuthFailReturn) | undefined): Promise<(import("elysia").ElysiaStatus<"Bad Request", "Cookies are missing", 400> | import("elysia").ElysiaStatus<"Unauthorized", "User is not authenticated", 401>) | AuthReturn | Awaited<AuthFailReturn>>;
|
|
349
|
+
<AuthReturn, AuthFailReturn_1 = never>(handleAuth: (user: UserType) => AuthReturn, handleAuthFail?: ((error: {
|
|
350
|
+
readonly code: "Bad Request";
|
|
351
|
+
readonly message: "Cookies are missing";
|
|
352
|
+
} | {
|
|
353
|
+
readonly code: "Unauthorized";
|
|
354
|
+
readonly message: "User is not authenticated";
|
|
355
|
+
}) => 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>>;
|
|
356
|
+
};
|
|
194
357
|
} & {
|
|
195
|
-
readonly
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
}
|
|
358
|
+
readonly requireRecentAuth: {
|
|
359
|
+
<AuthReturn, AuthFailReturn_2 = never>(maxAgeMs: number, handleAuth: (user: UserType) => Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
360
|
+
readonly code: "Unauthorized";
|
|
361
|
+
readonly message: "Recent authentication required";
|
|
362
|
+
}) => AuthFailReturn_2) | undefined): Promise<import("elysia").ElysiaStatus<"Unauthorized", "Recent authentication required", 401> | AuthReturn | Awaited<AuthFailReturn_2>>;
|
|
363
|
+
<AuthReturn, AuthFailReturn_3 = never>(maxAgeMs: number, handleAuth: (user: UserType) => AuthReturn, handleAuthFail?: ((error: {
|
|
364
|
+
readonly code: "Unauthorized";
|
|
365
|
+
readonly message: "Recent authentication required";
|
|
366
|
+
}) => AuthFailReturn_3) | undefined): Promise<import("elysia").ElysiaStatus<"Unauthorized", "Recent authentication required", 401> | AuthReturn | Awaited<AuthFailReturn_3>>;
|
|
367
|
+
};
|
|
205
368
|
} & {
|
|
206
|
-
readonly
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
369
|
+
readonly protectPermission: {
|
|
370
|
+
<AuthReturn, AuthFailReturn_6 = never>(check: import(".").PermissionCheck, handleAuth: (user: UserType) => Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
371
|
+
readonly code: "Bad Request";
|
|
372
|
+
readonly message: "Cookies are missing";
|
|
373
|
+
} | {
|
|
374
|
+
readonly code: "Forbidden";
|
|
375
|
+
readonly message: "Insufficient permissions";
|
|
376
|
+
} | {
|
|
377
|
+
readonly code: "Unauthorized";
|
|
378
|
+
readonly message: "User is not authenticated";
|
|
379
|
+
}) => AuthFailReturn_6) | undefined): Promise<(import("elysia").ElysiaStatus<"Bad Request", "Cookies are missing", 400> | import("elysia").ElysiaStatus<"Forbidden", "Insufficient permissions", 403> | import("elysia").ElysiaStatus<"Unauthorized", "User is not authenticated", 401>) | AuthReturn | Awaited<AuthFailReturn_6>>;
|
|
380
|
+
<AuthReturn, AuthFailReturn_7 = never>(check: import(".").PermissionCheck, handleAuth: (user: UserType) => AuthReturn, handleAuthFail?: ((error: {
|
|
381
|
+
readonly code: "Bad Request";
|
|
382
|
+
readonly message: "Cookies are missing";
|
|
383
|
+
} | {
|
|
384
|
+
readonly code: "Forbidden";
|
|
385
|
+
readonly message: "Insufficient permissions";
|
|
386
|
+
} | {
|
|
387
|
+
readonly code: "Unauthorized";
|
|
388
|
+
readonly message: "User is not authenticated";
|
|
389
|
+
}) => AuthFailReturn_7) | undefined): Promise<(import("elysia").ElysiaStatus<"Bad Request", "Cookies are missing", 400> | import("elysia").ElysiaStatus<"Forbidden", "Insufficient permissions", 403> | import("elysia").ElysiaStatus<"Unauthorized", "User is not authenticated", 401>) | AuthReturn | Awaited<AuthFailReturn_7>>;
|
|
390
|
+
};
|
|
391
|
+
} & {
|
|
392
|
+
readonly protectAgent: {
|
|
393
|
+
<AuthReturn, AuthFailReturn_4 = never>(requiredScopes: string[], handleAuth: (principal: import(".").AgentPrincipal) => Promise<AuthReturn>, handleAuthFail?: (error: {
|
|
394
|
+
code: "Forbidden" | "Unauthorized";
|
|
395
|
+
message: "Agent is not authenticated" | "Insufficient agent scopes";
|
|
396
|
+
}) => AuthFailReturn_4): Promise<Response | AuthReturn | Awaited<AuthFailReturn_4>>;
|
|
397
|
+
<AuthReturn, AuthFailReturn_5 = never>(requiredScopes: string[], handleAuth: (principal: import(".").AgentPrincipal) => AuthReturn, handleAuthFail?: (error: {
|
|
398
|
+
code: "Forbidden" | "Unauthorized";
|
|
399
|
+
message: "Agent is not authenticated" | "Insufficient agent scopes";
|
|
400
|
+
}) => AuthFailReturn_5): Promise<Response | AuthReturn | Awaited<AuthFailReturn_5>>;
|
|
401
|
+
};
|
|
210
402
|
});
|
|
211
403
|
}, {
|
|
212
404
|
typebox: {};
|
|
@@ -230,14 +422,22 @@ export declare const createAuthApplications: <UserType>(configuration: AuthConfi
|
|
|
230
422
|
macroFn: {};
|
|
231
423
|
parser: {};
|
|
232
424
|
response: import("elysia/types").ExtractErrorFromHandle<{
|
|
233
|
-
readonly
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
425
|
+
readonly protectRoute: {
|
|
426
|
+
<AuthReturn, AuthFailReturn = never>(handleAuth: (user: UserType) => Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
427
|
+
readonly code: "Bad Request";
|
|
428
|
+
readonly message: "Cookies are missing";
|
|
429
|
+
} | {
|
|
430
|
+
readonly code: "Unauthorized";
|
|
431
|
+
readonly message: "User is not authenticated";
|
|
432
|
+
}) => AuthFailReturn) | undefined): Promise<(import("elysia").ElysiaStatus<"Bad Request", "Cookies are missing", 400> | import("elysia").ElysiaStatus<"Unauthorized", "User is not authenticated", 401>) | AuthReturn | Awaited<AuthFailReturn>>;
|
|
433
|
+
<AuthReturn, AuthFailReturn_1 = never>(handleAuth: (user: UserType) => AuthReturn, handleAuthFail?: ((error: {
|
|
434
|
+
readonly code: "Bad Request";
|
|
435
|
+
readonly message: "Cookies are missing";
|
|
436
|
+
} | {
|
|
437
|
+
readonly code: "Unauthorized";
|
|
438
|
+
readonly message: "User is not authenticated";
|
|
439
|
+
}) => 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>>;
|
|
440
|
+
};
|
|
241
441
|
}>;
|
|
242
442
|
} & ({
|
|
243
443
|
schema: {};
|
|
@@ -251,10 +451,16 @@ export declare const createAuthApplications: <UserType>(configuration: AuthConfi
|
|
|
251
451
|
macroFn: {};
|
|
252
452
|
parser: {};
|
|
253
453
|
response: import("elysia/types").ExtractErrorFromHandle<{
|
|
254
|
-
readonly requireRecentAuth:
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
454
|
+
readonly requireRecentAuth: {
|
|
455
|
+
<AuthReturn, AuthFailReturn_2 = never>(maxAgeMs: number, handleAuth: (user: UserType) => Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
456
|
+
readonly code: "Unauthorized";
|
|
457
|
+
readonly message: "Recent authentication required";
|
|
458
|
+
}) => AuthFailReturn_2) | undefined): Promise<import("elysia").ElysiaStatus<"Unauthorized", "Recent authentication required", 401> | AuthReturn | Awaited<AuthFailReturn_2>>;
|
|
459
|
+
<AuthReturn, AuthFailReturn_3 = never>(maxAgeMs: number, handleAuth: (user: UserType) => AuthReturn, handleAuthFail?: ((error: {
|
|
460
|
+
readonly code: "Unauthorized";
|
|
461
|
+
readonly message: "Recent authentication required";
|
|
462
|
+
}) => AuthFailReturn_3) | undefined): Promise<import("elysia").ElysiaStatus<"Unauthorized", "Recent authentication required", 401> | AuthReturn | Awaited<AuthFailReturn_3>>;
|
|
463
|
+
};
|
|
258
464
|
}>;
|
|
259
465
|
} & (import("elysia/types").DefaultMetadata | {
|
|
260
466
|
schema: {};
|
|
@@ -268,16 +474,28 @@ export declare const createAuthApplications: <UserType>(configuration: AuthConfi
|
|
|
268
474
|
macroFn: {};
|
|
269
475
|
parser: {};
|
|
270
476
|
response: import("elysia/types").ExtractErrorFromHandle<{
|
|
271
|
-
readonly protectPermission:
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
477
|
+
readonly protectPermission: {
|
|
478
|
+
<AuthReturn, AuthFailReturn_6 = never>(check: import(".").PermissionCheck, handleAuth: (user: UserType) => Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
479
|
+
readonly code: "Bad Request";
|
|
480
|
+
readonly message: "Cookies are missing";
|
|
481
|
+
} | {
|
|
482
|
+
readonly code: "Forbidden";
|
|
483
|
+
readonly message: "Insufficient permissions";
|
|
484
|
+
} | {
|
|
485
|
+
readonly code: "Unauthorized";
|
|
486
|
+
readonly message: "User is not authenticated";
|
|
487
|
+
}) => AuthFailReturn_6) | undefined): Promise<(import("elysia").ElysiaStatus<"Bad Request", "Cookies are missing", 400> | import("elysia").ElysiaStatus<"Forbidden", "Insufficient permissions", 403> | import("elysia").ElysiaStatus<"Unauthorized", "User is not authenticated", 401>) | AuthReturn | Awaited<AuthFailReturn_6>>;
|
|
488
|
+
<AuthReturn, AuthFailReturn_7 = never>(check: import(".").PermissionCheck, handleAuth: (user: UserType) => AuthReturn, handleAuthFail?: ((error: {
|
|
489
|
+
readonly code: "Bad Request";
|
|
490
|
+
readonly message: "Cookies are missing";
|
|
491
|
+
} | {
|
|
492
|
+
readonly code: "Forbidden";
|
|
493
|
+
readonly message: "Insufficient permissions";
|
|
494
|
+
} | {
|
|
495
|
+
readonly code: "Unauthorized";
|
|
496
|
+
readonly message: "User is not authenticated";
|
|
497
|
+
}) => AuthFailReturn_7) | undefined): Promise<(import("elysia").ElysiaStatus<"Bad Request", "Cookies are missing", 400> | import("elysia").ElysiaStatus<"Forbidden", "Insufficient permissions", 403> | import("elysia").ElysiaStatus<"Unauthorized", "User is not authenticated", 401>) | AuthReturn | Awaited<AuthFailReturn_7>>;
|
|
498
|
+
};
|
|
281
499
|
}>;
|
|
282
500
|
}))))) & {
|
|
283
501
|
schema: {};
|
|
@@ -286,10 +504,16 @@ export declare const createAuthApplications: <UserType>(configuration: AuthConfi
|
|
|
286
504
|
macroFn: {};
|
|
287
505
|
parser: {};
|
|
288
506
|
response: import("elysia/types").ExtractErrorFromHandle<{
|
|
289
|
-
readonly protectAgent:
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
507
|
+
readonly protectAgent: {
|
|
508
|
+
<AuthReturn, AuthFailReturn_4 = never>(requiredScopes: string[], handleAuth: (principal: import(".").AgentPrincipal) => Promise<AuthReturn>, handleAuthFail?: (error: {
|
|
509
|
+
code: "Forbidden" | "Unauthorized";
|
|
510
|
+
message: "Agent is not authenticated" | "Insufficient agent scopes";
|
|
511
|
+
}) => AuthFailReturn_4): Promise<Response | AuthReturn | Awaited<AuthFailReturn_4>>;
|
|
512
|
+
<AuthReturn, AuthFailReturn_5 = never>(requiredScopes: string[], handleAuth: (principal: import(".").AgentPrincipal) => AuthReturn, handleAuthFail?: (error: {
|
|
513
|
+
code: "Forbidden" | "Unauthorized";
|
|
514
|
+
message: "Agent is not authenticated" | "Insufficient agent scopes";
|
|
515
|
+
}) => AuthFailReturn_5): Promise<Response | AuthReturn | Awaited<AuthFailReturn_5>>;
|
|
516
|
+
};
|
|
293
517
|
}>;
|
|
294
518
|
}, {}, import("elysia/types").DefaultEphemeral, {
|
|
295
519
|
derive: {};
|
|
@@ -936,16 +1160,38 @@ export declare const createAuthApplications: <UserType>(configuration: AuthConfi
|
|
|
936
1160
|
session: import("./types").SessionRecord<UserType> & import("./types").SessionRecord<import(".").AuthHtmxUser>;
|
|
937
1161
|
unregisteredSession: import("./types").UnregisteredSessionRecord;
|
|
938
1162
|
};
|
|
939
|
-
derive: {} | {
|
|
940
|
-
readonly
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
1163
|
+
derive: {} | ({
|
|
1164
|
+
readonly absoluteAuthStatus: {
|
|
1165
|
+
error: {
|
|
1166
|
+
readonly code: "Bad Request";
|
|
1167
|
+
readonly message: "Cookies are missing";
|
|
1168
|
+
};
|
|
1169
|
+
user: null;
|
|
1170
|
+
impersonator?: undefined;
|
|
944
1171
|
} | {
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
1172
|
+
error: null;
|
|
1173
|
+
impersonator: import("./types").Impersonator | undefined;
|
|
1174
|
+
user: import(".").AuthHtmxUser | null;
|
|
1175
|
+
};
|
|
1176
|
+
readonly authPrincipal: import("./principal").AuthPrincipal<import(".").AuthHtmxUser> | undefined;
|
|
1177
|
+
} & {
|
|
1178
|
+
readonly protectRoute: {
|
|
1179
|
+
<AuthReturn, AuthFailReturn = never>(handleAuth: (user: import(".").AuthHtmxUser) => Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
1180
|
+
readonly code: "Bad Request";
|
|
1181
|
+
readonly message: "Cookies are missing";
|
|
1182
|
+
} | {
|
|
1183
|
+
readonly code: "Unauthorized";
|
|
1184
|
+
readonly message: "User is not authenticated";
|
|
1185
|
+
}) => AuthFailReturn) | undefined): Promise<(import("elysia").ElysiaStatus<"Bad Request", "Cookies are missing", 400> | import("elysia").ElysiaStatus<"Unauthorized", "User is not authenticated", 401>) | AuthReturn | Awaited<AuthFailReturn>>;
|
|
1186
|
+
<AuthReturn, AuthFailReturn_1 = never>(handleAuth: (user: import(".").AuthHtmxUser) => AuthReturn, handleAuthFail?: ((error: {
|
|
1187
|
+
readonly code: "Bad Request";
|
|
1188
|
+
readonly message: "Cookies are missing";
|
|
1189
|
+
} | {
|
|
1190
|
+
readonly code: "Unauthorized";
|
|
1191
|
+
readonly message: "User is not authenticated";
|
|
1192
|
+
}) => 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>>;
|
|
1193
|
+
};
|
|
1194
|
+
});
|
|
949
1195
|
}, {
|
|
950
1196
|
typebox: {};
|
|
951
1197
|
error: [];
|
|
@@ -968,14 +1214,22 @@ export declare const createAuthApplications: <UserType>(configuration: AuthConfi
|
|
|
968
1214
|
macroFn: {};
|
|
969
1215
|
parser: {};
|
|
970
1216
|
response: import("elysia/types").ExtractErrorFromHandle<{
|
|
971
|
-
readonly
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
1217
|
+
readonly protectRoute: {
|
|
1218
|
+
<AuthReturn, AuthFailReturn = never>(handleAuth: (user: import(".").AuthHtmxUser) => Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
1219
|
+
readonly code: "Bad Request";
|
|
1220
|
+
readonly message: "Cookies are missing";
|
|
1221
|
+
} | {
|
|
1222
|
+
readonly code: "Unauthorized";
|
|
1223
|
+
readonly message: "User is not authenticated";
|
|
1224
|
+
}) => AuthFailReturn) | undefined): Promise<(import("elysia").ElysiaStatus<"Bad Request", "Cookies are missing", 400> | import("elysia").ElysiaStatus<"Unauthorized", "User is not authenticated", 401>) | AuthReturn | Awaited<AuthFailReturn>>;
|
|
1225
|
+
<AuthReturn, AuthFailReturn_1 = never>(handleAuth: (user: import(".").AuthHtmxUser) => AuthReturn, handleAuthFail?: ((error: {
|
|
1226
|
+
readonly code: "Bad Request";
|
|
1227
|
+
readonly message: "Cookies are missing";
|
|
1228
|
+
} | {
|
|
1229
|
+
readonly code: "Unauthorized";
|
|
1230
|
+
readonly message: "User is not authenticated";
|
|
1231
|
+
}) => 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>>;
|
|
1232
|
+
};
|
|
979
1233
|
}>;
|
|
980
1234
|
} & {
|
|
981
1235
|
schema: {};
|
|
@@ -3525,7 +3779,9 @@ export declare const createAuthApplications: <UserType>(configuration: AuthConfi
|
|
|
3525
3779
|
query: unknown;
|
|
3526
3780
|
headers: unknown;
|
|
3527
3781
|
response: {
|
|
3528
|
-
|
|
3782
|
+
400: "Cookies are missing";
|
|
3783
|
+
401: "User is not authenticated";
|
|
3784
|
+
200: Response;
|
|
3529
3785
|
422: {
|
|
3530
3786
|
type: "validation";
|
|
3531
3787
|
title: "Validation Error";
|
|
@@ -3554,7 +3810,9 @@ export declare const createAuthApplications: <UserType>(configuration: AuthConfi
|
|
|
3554
3810
|
query: unknown;
|
|
3555
3811
|
headers: unknown;
|
|
3556
3812
|
response: {
|
|
3557
|
-
|
|
3813
|
+
400: "Cookies are missing";
|
|
3814
|
+
401: "User is not authenticated";
|
|
3815
|
+
200: Response;
|
|
3558
3816
|
422: {
|
|
3559
3817
|
type: "validation";
|
|
3560
3818
|
title: "Validation Error";
|
|
@@ -3584,7 +3842,9 @@ export declare const createAuthApplications: <UserType>(configuration: AuthConfi
|
|
|
3584
3842
|
query: unknown;
|
|
3585
3843
|
headers: unknown;
|
|
3586
3844
|
response: {
|
|
3587
|
-
|
|
3845
|
+
400: "Cookies are missing";
|
|
3846
|
+
401: "User is not authenticated";
|
|
3847
|
+
200: Response;
|
|
3588
3848
|
422: {
|
|
3589
3849
|
type: "validation";
|
|
3590
3850
|
title: "Validation Error";
|
|
@@ -3613,7 +3873,9 @@ export declare const createAuthApplications: <UserType>(configuration: AuthConfi
|
|
|
3613
3873
|
query: unknown;
|
|
3614
3874
|
headers: unknown;
|
|
3615
3875
|
response: {
|
|
3616
|
-
|
|
3876
|
+
400: "Cookies are missing";
|
|
3877
|
+
401: "User is not authenticated";
|
|
3878
|
+
200: Response;
|
|
3617
3879
|
422: {
|
|
3618
3880
|
type: "validation";
|
|
3619
3881
|
title: "Validation Error";
|
|
@@ -3642,7 +3904,9 @@ export declare const createAuthApplications: <UserType>(configuration: AuthConfi
|
|
|
3642
3904
|
query: unknown;
|
|
3643
3905
|
headers: unknown;
|
|
3644
3906
|
response: {
|
|
3645
|
-
|
|
3907
|
+
400: "Cookies are missing";
|
|
3908
|
+
401: "User is not authenticated";
|
|
3909
|
+
200: Response;
|
|
3646
3910
|
422: {
|
|
3647
3911
|
type: "validation";
|
|
3648
3912
|
title: "Validation Error";
|
|
@@ -3699,7 +3963,9 @@ export declare const createAuthApplications: <UserType>(configuration: AuthConfi
|
|
|
3699
3963
|
query: unknown;
|
|
3700
3964
|
headers: unknown;
|
|
3701
3965
|
response: {
|
|
3702
|
-
|
|
3966
|
+
400: "Cookies are missing";
|
|
3967
|
+
401: "User is not authenticated";
|
|
3968
|
+
200: Response;
|
|
3703
3969
|
422: {
|
|
3704
3970
|
type: "validation";
|
|
3705
3971
|
title: "Validation Error";
|
|
@@ -3730,7 +3996,9 @@ export declare const createAuthApplications: <UserType>(configuration: AuthConfi
|
|
|
3730
3996
|
query: unknown;
|
|
3731
3997
|
headers: unknown;
|
|
3732
3998
|
response: {
|
|
3733
|
-
|
|
3999
|
+
400: "Cookies are missing";
|
|
4000
|
+
401: "User is not authenticated";
|
|
4001
|
+
200: Response;
|
|
3734
4002
|
422: {
|
|
3735
4003
|
type: "validation";
|
|
3736
4004
|
title: "Validation Error";
|
|
@@ -3782,7 +4050,9 @@ export declare const createAuthApplications: <UserType>(configuration: AuthConfi
|
|
|
3782
4050
|
query: unknown;
|
|
3783
4051
|
headers: unknown;
|
|
3784
4052
|
response: {
|
|
3785
|
-
|
|
4053
|
+
400: "Cookies are missing";
|
|
4054
|
+
401: "User is not authenticated";
|
|
4055
|
+
200: Response;
|
|
3786
4056
|
422: {
|
|
3787
4057
|
type: "validation";
|
|
3788
4058
|
title: "Validation Error";
|
|
@@ -3942,10 +4212,10 @@ export { createInMemoryAuthSessionStore } from './session/inMemoryStore';
|
|
|
3942
4212
|
export { createNeonAuthSessionStore } from './session/neonStore';
|
|
3943
4213
|
export { providersFromEnv, type ProviderSelection } from './providersFromEnv';
|
|
3944
4214
|
export { createRedisAuthSessionStore, type RedisSessionClient } from './session/redisStore';
|
|
3945
|
-
export { createLinkedProviderCredentialResolver } from './linkedProviders/resolver';
|
|
4215
|
+
export { createLinkedProviderCredentialResolver, type CreateLinkedProviderCredentialResolverOptions, type LinkedProviderRefreshResult } from './linkedProviders/resolver';
|
|
3946
4216
|
export { createOAuthLinkedProviderCredentialResolver } from './linkedProviders/oauthResolver';
|
|
3947
4217
|
export { createOAuthAccountLinkedProviderCredentialResolver, type OAuthLinkedProviderAccount, type OAuthLinkedProviderAccountStore } from './linkedProviders/oauthAccountResolver';
|
|
3948
|
-
export { createNeonLinkedProviderStores, createNeonOAuthLinkedProviderCredentialResolver } from './linkedProviders/neonStores';
|
|
4218
|
+
export { createLinkedProviderBindingStore, createLinkedProviderGrantStore, createNeonLinkedProviderStores, createNeonOAuthLinkedProviderCredentialResolver, linkedProviderBindingsTable, linkedProviderGrantsTable, type LinkedProviderBindingRow, type LinkedProviderGrantRow } from './linkedProviders/neonStores';
|
|
3949
4219
|
export { createInMemoryLinkedProviderStores } from './linkedProviders/inMemoryStores';
|
|
3950
4220
|
export { protectRoutePlugin } from './routes/protectRoute';
|
|
3951
4221
|
export { requireAuthPlugin } from './routes/requireAuth';
|