@absolutejs/auth 0.22.7 → 0.24.0
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/README.md +6 -13
- package/dist/htmxRoutes.d.ts +514 -0
- package/dist/index.d.ts +752 -1
- package/dist/index.js +207 -40
- package/dist/index.js.map +8 -6
- package/dist/{src/types.d.ts → types.d.ts} +6 -0
- package/dist/ui/index.d.ts +2 -0
- package/dist/ui/index.js +2212 -0
- package/dist/ui/index.js.map +11 -0
- package/dist/ui/renderers.d.ts +8 -0
- package/dist/ui/types.d.ts +129 -0
- package/package.json +71 -86
- package/dist/example/components/auth/AuthContainer.d.ts +0 -1
- package/dist/example/components/auth/OAuthButton.d.ts +0 -7
- package/dist/example/components/auth/OAuthButtons.d.ts +0 -5
- package/dist/example/components/hamburger/HamburgerDropdown.d.ts +0 -10
- package/dist/example/components/hamburger/HamburgerHeader.d.ts +0 -5
- package/dist/example/components/hamburger/HamburgerMenu.d.ts +0 -14
- package/dist/example/components/hamburger/HamburgerUserButtons.d.ts +0 -8
- package/dist/example/components/navbar/DropdownContainer.d.ts +0 -17
- package/dist/example/components/navbar/Navbar.d.ts +0 -7
- package/dist/example/components/navbar/NavbarDropdown.d.ts +0 -10
- package/dist/example/components/navbar/NavbarLink.d.ts +0 -8
- package/dist/example/components/navbar/NavbarLinks.d.ts +0 -6
- package/dist/example/components/navbar/NavbarUserButtons.d.ts +0 -7
- package/dist/example/components/page/Head.d.ts +0 -6
- package/dist/example/components/protected/AccountOverview.d.ts +0 -6
- package/dist/example/components/protected/DeleteAccountSection.d.ts +0 -5
- package/dist/example/components/protected/LinkedAuthIdentitiesPanel.d.ts +0 -1
- package/dist/example/components/protected/LinkedProvidersPanel.d.ts +0 -1
- package/dist/example/components/protected/ProviderButtons.d.ts +0 -1
- package/dist/example/components/protected/SettingsNoticeToast.d.ts +0 -1
- package/dist/example/components/protected/UserInfo.d.ts +0 -7
- package/dist/example/components/utils/AnimatedComponents.d.ts +0 -1
- package/dist/example/components/utils/Divider.d.ts +0 -7
- package/dist/example/components/utils/HighlightedJson.d.ts +0 -5
- package/dist/example/components/utils/JsonLine.d.ts +0 -6
- package/dist/example/components/utils/Modal.d.ts +0 -9
- package/dist/example/components/utils/ProfilePicture.d.ts +0 -8
- package/dist/example/components/utils/ProviderDropdown.d.ts +0 -8
- package/dist/example/components/utils/Toast.d.ts +0 -14
- package/dist/example/components/utils/ToastProvider.d.ts +0 -30
- package/dist/example/db/schema.d.ts +0 -2570
- package/dist/example/eden/treaty.d.ts +0 -1
- package/dist/example/handlers/userHandlers.d.ts +0 -254
- package/dist/example/hooks/useAuthIdentityPayload.d.ts +0 -37
- package/dist/example/hooks/useAuthStatus.d.ts +0 -19
- package/dist/example/hooks/useContainerQuery.d.ts +0 -10
- package/dist/example/hooks/useMediaQuery.d.ts +0 -11
- package/dist/example/linkedProviders/persistCallbackAuthorization.d.ts +0 -30
- package/dist/example/linkedProviders/resolver.d.ts +0 -1
- package/dist/example/linkedProviders/stores.d.ts +0 -9
- package/dist/example/pages/Connectors.d.ts +0 -1
- package/dist/example/pages/Home.d.ts +0 -1
- package/dist/example/pages/NotAuthorized.d.ts +0 -1
- package/dist/example/pages/Protected.d.ts +0 -1
- package/dist/example/pages/Settings.d.ts +0 -1
- package/dist/example/server.d.ts +0 -902
- package/dist/example/styles/authModalStyles.d.ts +0 -22
- package/dist/example/styles/navbarStyles.d.ts +0 -15
- package/dist/example/styles/styles.d.ts +0 -15
- package/dist/example/utils/absoluteAuthConfig.d.ts +0 -4
- package/dist/example/utils/constants.d.ts +0 -1
- package/dist/example/utils/navbarData.d.ts +0 -2
- package/dist/example/utils/providerData.d.ts +0 -9
- package/dist/example/utils/providersConfiguration.d.ts +0 -1
- package/dist/example/utils/typeGuards.d.ts +0 -1
- package/dist/example/utils/types.d.ts +0 -26
- package/dist/src/index.d.ts +0 -300
- /package/dist/{src/authSessionStores.d.ts → authSessionStores.d.ts} +0 -0
- /package/dist/{src/authorize.d.ts → authorize.d.ts} +0 -0
- /package/dist/{src/callback.d.ts → callback.d.ts} +0 -0
- /package/dist/{src/constants.d.ts → constants.d.ts} +0 -0
- /package/dist/{src/errors.d.ts → errors.d.ts} +0 -0
- /package/dist/{src/linkedProviderResolver.d.ts → linkedProviderResolver.d.ts} +0 -0
- /package/dist/{src/linkedProviderStores.d.ts → linkedProviderStores.d.ts} +0 -0
- /package/dist/{src/neonAuthSessionStore.d.ts → neonAuthSessionStore.d.ts} +0 -0
- /package/dist/{src/neonLinkedProviders.d.ts → neonLinkedProviders.d.ts} +0 -0
- /package/dist/{src/oauthLinkedProviderResolver.d.ts → oauthLinkedProviderResolver.d.ts} +0 -0
- /package/dist/{src/profile.d.ts → profile.d.ts} +0 -0
- /package/dist/{src/protectRoute.d.ts → protectRoute.d.ts} +0 -0
- /package/dist/{src/providerClients.d.ts → providerClients.d.ts} +0 -0
- /package/dist/{src/refresh.d.ts → refresh.d.ts} +0 -0
- /package/dist/{src/revoke.d.ts → revoke.d.ts} +0 -0
- /package/dist/{src/sessionAccess.d.ts → sessionAccess.d.ts} +0 -0
- /package/dist/{src/sessionCleanup.d.ts → sessionCleanup.d.ts} +0 -0
- /package/dist/{src/sessionStore.d.ts → sessionStore.d.ts} +0 -0
- /package/dist/{src/sessionTypes.d.ts → sessionTypes.d.ts} +0 -0
- /package/dist/{src/signout.d.ts → signout.d.ts} +0 -0
- /package/dist/{src/typeGuards.d.ts → typeGuards.d.ts} +0 -0
- /package/dist/{src/typebox.d.ts → typebox.d.ts} +0 -0
- /package/dist/{src/userStatus.d.ts → userStatus.d.ts} +0 -0
- /package/dist/{src/utils.d.ts → utils.d.ts} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1 +1,752 @@
|
|
|
1
|
-
|
|
1
|
+
import { Elysia } from 'elysia';
|
|
2
|
+
import { AbsoluteAuthProps } from './types';
|
|
3
|
+
import type { AuthHtmxUser } from './ui/types';
|
|
4
|
+
export declare const absoluteAuth: <UserType extends AuthHtmxUser>({ providersConfiguration, authorizeRoute, callbackRoute, profileRoute, signoutRoute, statusRoute, refreshRoute, revokeRoute, cleanupIntervalMs, maxSessions, sessionDurationMs, authSessionStore, htmx, resolveAuthIntent, onAuthorizeSuccess, onAuthorizeError, onProfileSuccess, onProfileError, onCallbackSuccess, onLinkIdentity, onLinkIdentityConflict, onLinkConnector, onCallbackError, onStatus, onRefreshSuccess, onRefreshError, onSignOut, onRevocationSuccess, onRevocationError, onSessionCleanup }: AbsoluteAuthProps<UserType>) => Promise<Elysia<"", {
|
|
5
|
+
decorator: {};
|
|
6
|
+
store: {
|
|
7
|
+
session: import("./types").SessionRecord<UserType> & import("./types").SessionRecord<unknown>;
|
|
8
|
+
unregisteredSession: import("./types").UnregisteredSessionRecord;
|
|
9
|
+
} | {
|
|
10
|
+
session: import("./types").SessionRecord<UserType> & import("./types").SessionRecord<unknown>;
|
|
11
|
+
unregisteredSession: import("./types").UnregisteredSessionRecord;
|
|
12
|
+
};
|
|
13
|
+
derive: {
|
|
14
|
+
readonly cleanupSessions: () => Promise<void>;
|
|
15
|
+
} & {
|
|
16
|
+
readonly protectRoute: <AuthReturn, AuthFailReturn>(handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
17
|
+
readonly code: "Bad Request";
|
|
18
|
+
readonly message: "Cookies are missing";
|
|
19
|
+
} | {
|
|
20
|
+
readonly code: "Unauthorized";
|
|
21
|
+
readonly message: "User is not authenticated";
|
|
22
|
+
}) => AuthFailReturn) | undefined) => Promise<import("elysia").ElysiaCustomStatusResponse<"Bad Request", "Cookies are missing", 400> | import("elysia").ElysiaCustomStatusResponse<"Unauthorized", "User is not authenticated", 401> | AuthReturn | NonNullable<AuthFailReturn>>;
|
|
23
|
+
};
|
|
24
|
+
resolve: {};
|
|
25
|
+
}, {
|
|
26
|
+
typebox: {};
|
|
27
|
+
error: {};
|
|
28
|
+
}, {
|
|
29
|
+
schema: {};
|
|
30
|
+
standaloneSchema: {};
|
|
31
|
+
macro: {};
|
|
32
|
+
macroFn: {};
|
|
33
|
+
parser: {};
|
|
34
|
+
response: {};
|
|
35
|
+
} & {
|
|
36
|
+
schema: {};
|
|
37
|
+
standaloneSchema: {};
|
|
38
|
+
macro: {};
|
|
39
|
+
macroFn: {};
|
|
40
|
+
parser: {};
|
|
41
|
+
response: import("elysia").ExtractErrorFromHandle<{
|
|
42
|
+
readonly cleanupSessions: () => Promise<void>;
|
|
43
|
+
}>;
|
|
44
|
+
} & {
|
|
45
|
+
schema: import("elysia").UnwrapRoute<{
|
|
46
|
+
cookie: import("@sinclair/typebox").TObject<{
|
|
47
|
+
user_session_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"${string}-${string}-${string}-${string}-${string}">>;
|
|
48
|
+
}>;
|
|
49
|
+
}, {}, "">;
|
|
50
|
+
standaloneSchema: {};
|
|
51
|
+
macro: {};
|
|
52
|
+
macroFn: {};
|
|
53
|
+
parser: {};
|
|
54
|
+
response: import("elysia").ExtractErrorFromHandle<{
|
|
55
|
+
readonly protectRoute: <AuthReturn, AuthFailReturn>(handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: ((error: {
|
|
56
|
+
readonly code: "Bad Request";
|
|
57
|
+
readonly message: "Cookies are missing";
|
|
58
|
+
} | {
|
|
59
|
+
readonly code: "Unauthorized";
|
|
60
|
+
readonly message: "User is not authenticated";
|
|
61
|
+
}) => AuthFailReturn) | undefined) => Promise<import("elysia").ElysiaCustomStatusResponse<"Bad Request", "Cookies are missing", 400> | import("elysia").ElysiaCustomStatusResponse<"Unauthorized", "User is not authenticated", 401> | AuthReturn | NonNullable<AuthFailReturn>>;
|
|
62
|
+
}>;
|
|
63
|
+
}, (((({
|
|
64
|
+
[x: string]: {
|
|
65
|
+
delete: {
|
|
66
|
+
body: unknown;
|
|
67
|
+
params: {};
|
|
68
|
+
query: unknown;
|
|
69
|
+
headers: unknown;
|
|
70
|
+
response: {
|
|
71
|
+
200: Response;
|
|
72
|
+
400: "Cookies are missing";
|
|
73
|
+
401: "No auth provider found" | "No user session id found";
|
|
74
|
+
422: {
|
|
75
|
+
type: "validation";
|
|
76
|
+
on: string;
|
|
77
|
+
summary?: string;
|
|
78
|
+
message?: string;
|
|
79
|
+
found?: unknown;
|
|
80
|
+
property?: string;
|
|
81
|
+
expected?: string;
|
|
82
|
+
};
|
|
83
|
+
500: "Sign out operation failed";
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
} & {
|
|
88
|
+
[x: string]: {
|
|
89
|
+
post: {
|
|
90
|
+
body: unknown;
|
|
91
|
+
params: {};
|
|
92
|
+
query: unknown;
|
|
93
|
+
headers: unknown;
|
|
94
|
+
response: {
|
|
95
|
+
200: Response;
|
|
96
|
+
400: "Cookies are missing" | "Invalid provider";
|
|
97
|
+
401: "Client provider not found" | "Client variant is required" | "Client variant not found" | "Provider is required" | "No auth provider found" | "No user session found";
|
|
98
|
+
422: {
|
|
99
|
+
type: "validation";
|
|
100
|
+
on: string;
|
|
101
|
+
summary?: string;
|
|
102
|
+
message?: string;
|
|
103
|
+
found?: unknown;
|
|
104
|
+
property?: string;
|
|
105
|
+
expected?: string;
|
|
106
|
+
};
|
|
107
|
+
500: "Failed to revoke token";
|
|
108
|
+
501: "Provider does not support revocation";
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
} & ({
|
|
113
|
+
[x: string]: {
|
|
114
|
+
get: {
|
|
115
|
+
body: unknown;
|
|
116
|
+
params: {};
|
|
117
|
+
query: unknown;
|
|
118
|
+
headers: unknown;
|
|
119
|
+
response: {
|
|
120
|
+
200: {
|
|
121
|
+
user: NonNullable<UserType> | null;
|
|
122
|
+
};
|
|
123
|
+
400: "Cookies are missing";
|
|
124
|
+
422: {
|
|
125
|
+
type: "validation";
|
|
126
|
+
on: string;
|
|
127
|
+
summary?: string;
|
|
128
|
+
message?: string;
|
|
129
|
+
found?: unknown;
|
|
130
|
+
property?: string;
|
|
131
|
+
expected?: string;
|
|
132
|
+
};
|
|
133
|
+
500: `Error: ${string} - ${string}` | `Unknown Error: ${string}`;
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
} & ({
|
|
138
|
+
[x: string]: {
|
|
139
|
+
post: {
|
|
140
|
+
body: unknown;
|
|
141
|
+
params: {};
|
|
142
|
+
query: unknown;
|
|
143
|
+
headers: unknown;
|
|
144
|
+
response: {
|
|
145
|
+
200: Response;
|
|
146
|
+
400: "Cookies are missing" | "Invalid provider" | "No refresh token found";
|
|
147
|
+
401: "Client provider not found" | "Client variant is required" | "Client variant not found" | "Provider is required" | "No auth provider found" | "No user session found";
|
|
148
|
+
422: {
|
|
149
|
+
type: "validation";
|
|
150
|
+
on: string;
|
|
151
|
+
summary?: string;
|
|
152
|
+
message?: string;
|
|
153
|
+
found?: unknown;
|
|
154
|
+
property?: string;
|
|
155
|
+
expected?: string;
|
|
156
|
+
};
|
|
157
|
+
500: "Failed to refresh token";
|
|
158
|
+
501: "Provider is not refreshable";
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
} & ({
|
|
163
|
+
[x: string]: {
|
|
164
|
+
":provider": {
|
|
165
|
+
get: {
|
|
166
|
+
body: unknown;
|
|
167
|
+
params: {
|
|
168
|
+
provider: "42" | "amazoncognito" | "anilist" | "apple" | "atlassian" | "auth0" | "authentik" | "autodesk" | "battlenet" | "bitbucket" | "box" | "bungie" | "coinbase" | "discord" | "donationalerts" | "dribbble" | "dropbox" | "epicgames" | "etsy" | "facebook" | "figma" | "gitea" | "github" | "gitlab" | "google" | "intuit" | "kakao" | "keycloak" | "kick" | "lichess" | "line" | "linear" | "linkedin" | "mastodon" | "mercadolibre" | "mercadopago" | "microsoftentraid" | "myanimelist" | "naver" | "notion" | "okta" | "osu" | "patreon" | "polar" | "polaraccesslink" | "polarteampro" | "reddit" | "roblox" | "salesforce" | "shikimori" | "slack" | "spotify" | "startgg" | "strava" | "synology" | "tiktok" | "tiltify" | "tumblr" | "twitch" | "twitter" | "vk" | "withings" | "workos" | "yahoo" | "yandex" | "zoom";
|
|
169
|
+
};
|
|
170
|
+
query: {
|
|
171
|
+
client?: string | undefined;
|
|
172
|
+
intent?: "login" | "link_identity" | "link_connector" | undefined;
|
|
173
|
+
};
|
|
174
|
+
headers: unknown;
|
|
175
|
+
response: {
|
|
176
|
+
200: Response;
|
|
177
|
+
400: "Provider is required" | "Cookies are missing";
|
|
178
|
+
401: "Client provider not found" | "Client variant is required" | "Client variant not found" | "Provider is required";
|
|
179
|
+
422: {
|
|
180
|
+
type: "validation";
|
|
181
|
+
on: string;
|
|
182
|
+
summary?: string;
|
|
183
|
+
message?: string;
|
|
184
|
+
found?: unknown;
|
|
185
|
+
property?: string;
|
|
186
|
+
expected?: string;
|
|
187
|
+
};
|
|
188
|
+
500: "Failed to create authorization URL";
|
|
189
|
+
};
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
};
|
|
193
|
+
} | {
|
|
194
|
+
[x: string]: {
|
|
195
|
+
":provider": {
|
|
196
|
+
[x: string]: {
|
|
197
|
+
get: {
|
|
198
|
+
body: unknown;
|
|
199
|
+
params: {
|
|
200
|
+
provider: "42" | "amazoncognito" | "anilist" | "apple" | "atlassian" | "auth0" | "authentik" | "autodesk" | "battlenet" | "bitbucket" | "box" | "bungie" | "coinbase" | "discord" | "donationalerts" | "dribbble" | "dropbox" | "epicgames" | "etsy" | "facebook" | "figma" | "gitea" | "github" | "gitlab" | "google" | "intuit" | "kakao" | "keycloak" | "kick" | "lichess" | "line" | "linear" | "linkedin" | "mastodon" | "mercadolibre" | "mercadopago" | "microsoftentraid" | "myanimelist" | "naver" | "notion" | "okta" | "osu" | "patreon" | "polar" | "polaraccesslink" | "polarteampro" | "reddit" | "roblox" | "salesforce" | "shikimori" | "slack" | "spotify" | "startgg" | "strava" | "synology" | "tiktok" | "tiltify" | "tumblr" | "twitch" | "twitter" | "vk" | "withings" | "workos" | "yahoo" | "yandex" | "zoom";
|
|
201
|
+
};
|
|
202
|
+
query: {
|
|
203
|
+
client?: string | undefined;
|
|
204
|
+
intent?: "login" | "link_identity" | "link_connector" | undefined;
|
|
205
|
+
};
|
|
206
|
+
headers: unknown;
|
|
207
|
+
response: {
|
|
208
|
+
200: Response;
|
|
209
|
+
400: "Provider is required" | "Cookies are missing";
|
|
210
|
+
401: "Client provider not found" | "Client variant is required" | "Client variant not found" | "Provider is required";
|
|
211
|
+
422: {
|
|
212
|
+
type: "validation";
|
|
213
|
+
on: string;
|
|
214
|
+
summary?: string;
|
|
215
|
+
message?: string;
|
|
216
|
+
found?: unknown;
|
|
217
|
+
property?: string;
|
|
218
|
+
expected?: string;
|
|
219
|
+
};
|
|
220
|
+
500: "Failed to create authorization URL";
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
})))) & {
|
|
227
|
+
[x: string]: {
|
|
228
|
+
get: {
|
|
229
|
+
body: unknown;
|
|
230
|
+
params: {};
|
|
231
|
+
query: unknown;
|
|
232
|
+
headers: unknown;
|
|
233
|
+
response: {
|
|
234
|
+
[x: string]: any;
|
|
235
|
+
};
|
|
236
|
+
};
|
|
237
|
+
};
|
|
238
|
+
}) & {
|
|
239
|
+
[x: string]: {
|
|
240
|
+
get: {
|
|
241
|
+
body: unknown;
|
|
242
|
+
params: {};
|
|
243
|
+
query: unknown;
|
|
244
|
+
headers: unknown;
|
|
245
|
+
response: {
|
|
246
|
+
200: Response;
|
|
247
|
+
400: "Cookies are missing";
|
|
248
|
+
401: "Client provider not found" | "Client variant is required" | "Client variant not found" | "Provider is required" | "No auth provider found" | "Invalid provider" | "No user session found";
|
|
249
|
+
422: {
|
|
250
|
+
type: "validation";
|
|
251
|
+
on: string;
|
|
252
|
+
summary?: string;
|
|
253
|
+
message?: string;
|
|
254
|
+
found?: unknown;
|
|
255
|
+
property?: string;
|
|
256
|
+
expected?: string;
|
|
257
|
+
};
|
|
258
|
+
500: `${string} - ${string}` | `Failed to validate authorization code: Unknown status: ${string}`;
|
|
259
|
+
};
|
|
260
|
+
};
|
|
261
|
+
};
|
|
262
|
+
}) & {}) & ({} | ({
|
|
263
|
+
htmx: {
|
|
264
|
+
login: {
|
|
265
|
+
get: {
|
|
266
|
+
body: unknown;
|
|
267
|
+
params: {};
|
|
268
|
+
query: unknown;
|
|
269
|
+
headers: unknown;
|
|
270
|
+
response: {
|
|
271
|
+
200: Response;
|
|
272
|
+
422: {
|
|
273
|
+
type: "validation";
|
|
274
|
+
on: string;
|
|
275
|
+
summary?: string;
|
|
276
|
+
message?: string;
|
|
277
|
+
found?: unknown;
|
|
278
|
+
property?: string;
|
|
279
|
+
expected?: string;
|
|
280
|
+
};
|
|
281
|
+
};
|
|
282
|
+
};
|
|
283
|
+
};
|
|
284
|
+
};
|
|
285
|
+
} & {
|
|
286
|
+
htmx: {
|
|
287
|
+
link: {
|
|
288
|
+
get: {
|
|
289
|
+
body: unknown;
|
|
290
|
+
params: {};
|
|
291
|
+
query: unknown;
|
|
292
|
+
headers: unknown;
|
|
293
|
+
response: {
|
|
294
|
+
200: Response;
|
|
295
|
+
422: {
|
|
296
|
+
type: "validation";
|
|
297
|
+
on: string;
|
|
298
|
+
summary?: string;
|
|
299
|
+
message?: string;
|
|
300
|
+
found?: unknown;
|
|
301
|
+
property?: string;
|
|
302
|
+
expected?: string;
|
|
303
|
+
};
|
|
304
|
+
};
|
|
305
|
+
};
|
|
306
|
+
};
|
|
307
|
+
};
|
|
308
|
+
} & {
|
|
309
|
+
htmx: {
|
|
310
|
+
"connector-links": {
|
|
311
|
+
get: {
|
|
312
|
+
body: unknown;
|
|
313
|
+
params: {};
|
|
314
|
+
query: unknown;
|
|
315
|
+
headers: unknown;
|
|
316
|
+
response: {
|
|
317
|
+
200: Response;
|
|
318
|
+
422: {
|
|
319
|
+
type: "validation";
|
|
320
|
+
on: string;
|
|
321
|
+
summary?: string;
|
|
322
|
+
message?: string;
|
|
323
|
+
found?: unknown;
|
|
324
|
+
property?: string;
|
|
325
|
+
expected?: string;
|
|
326
|
+
};
|
|
327
|
+
};
|
|
328
|
+
};
|
|
329
|
+
};
|
|
330
|
+
};
|
|
331
|
+
} & {
|
|
332
|
+
htmx: {
|
|
333
|
+
"auth-menu": {
|
|
334
|
+
get: {
|
|
335
|
+
body: unknown;
|
|
336
|
+
params: {};
|
|
337
|
+
query: unknown;
|
|
338
|
+
headers: unknown;
|
|
339
|
+
response: {
|
|
340
|
+
200: Response;
|
|
341
|
+
400: "Cookies are missing";
|
|
342
|
+
401: "User is not authenticated";
|
|
343
|
+
422: {
|
|
344
|
+
type: "validation";
|
|
345
|
+
on: string;
|
|
346
|
+
summary?: string;
|
|
347
|
+
message?: string;
|
|
348
|
+
found?: unknown;
|
|
349
|
+
property?: string;
|
|
350
|
+
expected?: string;
|
|
351
|
+
};
|
|
352
|
+
};
|
|
353
|
+
};
|
|
354
|
+
};
|
|
355
|
+
};
|
|
356
|
+
} & {
|
|
357
|
+
htmx: {
|
|
358
|
+
me: {
|
|
359
|
+
get: {
|
|
360
|
+
body: unknown;
|
|
361
|
+
params: {};
|
|
362
|
+
query: unknown;
|
|
363
|
+
headers: unknown;
|
|
364
|
+
response: {
|
|
365
|
+
200: Response;
|
|
366
|
+
400: "Cookies are missing";
|
|
367
|
+
401: "User is not authenticated";
|
|
368
|
+
422: {
|
|
369
|
+
type: "validation";
|
|
370
|
+
on: string;
|
|
371
|
+
summary?: string;
|
|
372
|
+
message?: string;
|
|
373
|
+
found?: unknown;
|
|
374
|
+
property?: string;
|
|
375
|
+
expected?: string;
|
|
376
|
+
};
|
|
377
|
+
};
|
|
378
|
+
};
|
|
379
|
+
};
|
|
380
|
+
};
|
|
381
|
+
} & {
|
|
382
|
+
htmx: {
|
|
383
|
+
account: {
|
|
384
|
+
get: {
|
|
385
|
+
body: unknown;
|
|
386
|
+
params: {};
|
|
387
|
+
query: unknown;
|
|
388
|
+
headers: unknown;
|
|
389
|
+
response: {
|
|
390
|
+
200: Response;
|
|
391
|
+
400: "Cookies are missing";
|
|
392
|
+
401: "User is not authenticated";
|
|
393
|
+
422: {
|
|
394
|
+
type: "validation";
|
|
395
|
+
on: string;
|
|
396
|
+
summary?: string;
|
|
397
|
+
message?: string;
|
|
398
|
+
found?: unknown;
|
|
399
|
+
property?: string;
|
|
400
|
+
expected?: string;
|
|
401
|
+
};
|
|
402
|
+
};
|
|
403
|
+
};
|
|
404
|
+
};
|
|
405
|
+
};
|
|
406
|
+
} & {
|
|
407
|
+
htmx: {
|
|
408
|
+
identities: {
|
|
409
|
+
get: {
|
|
410
|
+
body: unknown;
|
|
411
|
+
params: {};
|
|
412
|
+
query: unknown;
|
|
413
|
+
headers: unknown;
|
|
414
|
+
response: {
|
|
415
|
+
200: {} | Response;
|
|
416
|
+
400: "Cookies are missing";
|
|
417
|
+
401: "User is not authenticated";
|
|
418
|
+
422: {
|
|
419
|
+
type: "validation";
|
|
420
|
+
on: string;
|
|
421
|
+
summary?: string;
|
|
422
|
+
message?: string;
|
|
423
|
+
found?: unknown;
|
|
424
|
+
property?: string;
|
|
425
|
+
expected?: string;
|
|
426
|
+
};
|
|
427
|
+
};
|
|
428
|
+
};
|
|
429
|
+
};
|
|
430
|
+
};
|
|
431
|
+
} & {
|
|
432
|
+
htmx: {
|
|
433
|
+
identities: {
|
|
434
|
+
":id": {
|
|
435
|
+
primary: {
|
|
436
|
+
post: {
|
|
437
|
+
body: unknown;
|
|
438
|
+
params: {
|
|
439
|
+
id: string;
|
|
440
|
+
} & {};
|
|
441
|
+
query: unknown;
|
|
442
|
+
headers: unknown;
|
|
443
|
+
response: {
|
|
444
|
+
200: {} | Response;
|
|
445
|
+
400: "Cookies are missing";
|
|
446
|
+
401: "User is not authenticated";
|
|
447
|
+
422: {
|
|
448
|
+
type: "validation";
|
|
449
|
+
on: string;
|
|
450
|
+
summary?: string;
|
|
451
|
+
message?: string;
|
|
452
|
+
found?: unknown;
|
|
453
|
+
property?: string;
|
|
454
|
+
expected?: string;
|
|
455
|
+
};
|
|
456
|
+
};
|
|
457
|
+
};
|
|
458
|
+
};
|
|
459
|
+
};
|
|
460
|
+
};
|
|
461
|
+
};
|
|
462
|
+
} & {
|
|
463
|
+
htmx: {
|
|
464
|
+
identities: {
|
|
465
|
+
":id": {
|
|
466
|
+
delete: {
|
|
467
|
+
body: unknown;
|
|
468
|
+
params: {
|
|
469
|
+
id: string;
|
|
470
|
+
} & {};
|
|
471
|
+
query: unknown;
|
|
472
|
+
headers: unknown;
|
|
473
|
+
response: {
|
|
474
|
+
200: {} | Response;
|
|
475
|
+
400: "Cookies are missing";
|
|
476
|
+
401: "User is not authenticated";
|
|
477
|
+
422: {
|
|
478
|
+
type: "validation";
|
|
479
|
+
on: string;
|
|
480
|
+
summary?: string;
|
|
481
|
+
message?: string;
|
|
482
|
+
found?: unknown;
|
|
483
|
+
property?: string;
|
|
484
|
+
expected?: string;
|
|
485
|
+
};
|
|
486
|
+
};
|
|
487
|
+
};
|
|
488
|
+
};
|
|
489
|
+
};
|
|
490
|
+
};
|
|
491
|
+
} & {
|
|
492
|
+
htmx: {
|
|
493
|
+
merge: {
|
|
494
|
+
":id": {
|
|
495
|
+
post: {
|
|
496
|
+
body: unknown;
|
|
497
|
+
params: {
|
|
498
|
+
id: string;
|
|
499
|
+
} & {};
|
|
500
|
+
query: unknown;
|
|
501
|
+
headers: unknown;
|
|
502
|
+
response: {
|
|
503
|
+
200: {} | Response;
|
|
504
|
+
400: "Cookies are missing";
|
|
505
|
+
401: "User is not authenticated";
|
|
506
|
+
422: {
|
|
507
|
+
type: "validation";
|
|
508
|
+
on: string;
|
|
509
|
+
summary?: string;
|
|
510
|
+
message?: string;
|
|
511
|
+
found?: unknown;
|
|
512
|
+
property?: string;
|
|
513
|
+
expected?: string;
|
|
514
|
+
};
|
|
515
|
+
};
|
|
516
|
+
};
|
|
517
|
+
};
|
|
518
|
+
};
|
|
519
|
+
};
|
|
520
|
+
} & {
|
|
521
|
+
htmx: {
|
|
522
|
+
merge: {
|
|
523
|
+
":id": {
|
|
524
|
+
delete: {
|
|
525
|
+
body: unknown;
|
|
526
|
+
params: {
|
|
527
|
+
id: string;
|
|
528
|
+
} & {};
|
|
529
|
+
query: unknown;
|
|
530
|
+
headers: unknown;
|
|
531
|
+
response: {
|
|
532
|
+
200: {} | Response;
|
|
533
|
+
400: "Cookies are missing";
|
|
534
|
+
401: "User is not authenticated";
|
|
535
|
+
422: {
|
|
536
|
+
type: "validation";
|
|
537
|
+
on: string;
|
|
538
|
+
summary?: string;
|
|
539
|
+
message?: string;
|
|
540
|
+
found?: unknown;
|
|
541
|
+
property?: string;
|
|
542
|
+
expected?: string;
|
|
543
|
+
};
|
|
544
|
+
};
|
|
545
|
+
};
|
|
546
|
+
};
|
|
547
|
+
};
|
|
548
|
+
};
|
|
549
|
+
} & {
|
|
550
|
+
htmx: {
|
|
551
|
+
"connector-list": {
|
|
552
|
+
get: {
|
|
553
|
+
body: unknown;
|
|
554
|
+
params: {};
|
|
555
|
+
query: unknown;
|
|
556
|
+
headers: unknown;
|
|
557
|
+
response: {
|
|
558
|
+
200: Response;
|
|
559
|
+
400: "Cookies are missing";
|
|
560
|
+
401: "User is not authenticated";
|
|
561
|
+
422: {
|
|
562
|
+
type: "validation";
|
|
563
|
+
on: string;
|
|
564
|
+
summary?: string;
|
|
565
|
+
message?: string;
|
|
566
|
+
found?: unknown;
|
|
567
|
+
property?: string;
|
|
568
|
+
expected?: string;
|
|
569
|
+
};
|
|
570
|
+
};
|
|
571
|
+
};
|
|
572
|
+
};
|
|
573
|
+
};
|
|
574
|
+
} & {
|
|
575
|
+
htmx: {
|
|
576
|
+
connectors: {
|
|
577
|
+
grants: {
|
|
578
|
+
":id": {
|
|
579
|
+
delete: {
|
|
580
|
+
body: unknown;
|
|
581
|
+
params: {
|
|
582
|
+
id: string;
|
|
583
|
+
} & {};
|
|
584
|
+
query: unknown;
|
|
585
|
+
headers: unknown;
|
|
586
|
+
response: {
|
|
587
|
+
200: {} | Response;
|
|
588
|
+
400: "Cookies are missing";
|
|
589
|
+
401: "User is not authenticated";
|
|
590
|
+
422: {
|
|
591
|
+
type: "validation";
|
|
592
|
+
on: string;
|
|
593
|
+
summary?: string;
|
|
594
|
+
message?: string;
|
|
595
|
+
found?: unknown;
|
|
596
|
+
property?: string;
|
|
597
|
+
expected?: string;
|
|
598
|
+
};
|
|
599
|
+
};
|
|
600
|
+
};
|
|
601
|
+
};
|
|
602
|
+
};
|
|
603
|
+
};
|
|
604
|
+
};
|
|
605
|
+
} & {
|
|
606
|
+
htmx: {
|
|
607
|
+
connectors: {
|
|
608
|
+
bindings: {
|
|
609
|
+
":id": {
|
|
610
|
+
delete: {
|
|
611
|
+
body: unknown;
|
|
612
|
+
params: {
|
|
613
|
+
id: string;
|
|
614
|
+
} & {};
|
|
615
|
+
query: unknown;
|
|
616
|
+
headers: unknown;
|
|
617
|
+
response: {
|
|
618
|
+
200: {} | Response;
|
|
619
|
+
400: "Cookies are missing";
|
|
620
|
+
401: "User is not authenticated";
|
|
621
|
+
422: {
|
|
622
|
+
type: "validation";
|
|
623
|
+
on: string;
|
|
624
|
+
summary?: string;
|
|
625
|
+
message?: string;
|
|
626
|
+
found?: unknown;
|
|
627
|
+
property?: string;
|
|
628
|
+
expected?: string;
|
|
629
|
+
};
|
|
630
|
+
};
|
|
631
|
+
};
|
|
632
|
+
};
|
|
633
|
+
};
|
|
634
|
+
};
|
|
635
|
+
};
|
|
636
|
+
} & {
|
|
637
|
+
htmx: {
|
|
638
|
+
"login-redirect": {
|
|
639
|
+
get: {
|
|
640
|
+
body: unknown;
|
|
641
|
+
params: {};
|
|
642
|
+
query: unknown;
|
|
643
|
+
headers: unknown;
|
|
644
|
+
response: {
|
|
645
|
+
200: Response;
|
|
646
|
+
422: {
|
|
647
|
+
type: "validation";
|
|
648
|
+
on: string;
|
|
649
|
+
summary?: string;
|
|
650
|
+
message?: string;
|
|
651
|
+
found?: unknown;
|
|
652
|
+
property?: string;
|
|
653
|
+
expected?: string;
|
|
654
|
+
};
|
|
655
|
+
};
|
|
656
|
+
};
|
|
657
|
+
};
|
|
658
|
+
};
|
|
659
|
+
} & {
|
|
660
|
+
htmx: {
|
|
661
|
+
"delete-account": {
|
|
662
|
+
post: {
|
|
663
|
+
body: unknown;
|
|
664
|
+
params: {};
|
|
665
|
+
query: unknown;
|
|
666
|
+
headers: unknown;
|
|
667
|
+
response: {
|
|
668
|
+
200: {} | Response;
|
|
669
|
+
400: "Cookies are missing";
|
|
670
|
+
401: "User is not authenticated";
|
|
671
|
+
422: {
|
|
672
|
+
type: "validation";
|
|
673
|
+
on: string;
|
|
674
|
+
summary?: string;
|
|
675
|
+
message?: string;
|
|
676
|
+
found?: unknown;
|
|
677
|
+
property?: string;
|
|
678
|
+
expected?: string;
|
|
679
|
+
};
|
|
680
|
+
};
|
|
681
|
+
};
|
|
682
|
+
};
|
|
683
|
+
};
|
|
684
|
+
} & {
|
|
685
|
+
htmx: {
|
|
686
|
+
signout: {
|
|
687
|
+
get: {
|
|
688
|
+
body: unknown;
|
|
689
|
+
params: {};
|
|
690
|
+
query: unknown;
|
|
691
|
+
headers: unknown;
|
|
692
|
+
response: {
|
|
693
|
+
200: Response;
|
|
694
|
+
422: {
|
|
695
|
+
type: "validation";
|
|
696
|
+
on: string;
|
|
697
|
+
summary?: string;
|
|
698
|
+
message?: string;
|
|
699
|
+
found?: unknown;
|
|
700
|
+
property?: string;
|
|
701
|
+
expected?: string;
|
|
702
|
+
};
|
|
703
|
+
};
|
|
704
|
+
};
|
|
705
|
+
};
|
|
706
|
+
};
|
|
707
|
+
})), {
|
|
708
|
+
derive: {};
|
|
709
|
+
resolve: {};
|
|
710
|
+
schema: {};
|
|
711
|
+
standaloneSchema: {};
|
|
712
|
+
response: {};
|
|
713
|
+
}, {
|
|
714
|
+
derive: {};
|
|
715
|
+
resolve: {};
|
|
716
|
+
schema: {};
|
|
717
|
+
standaloneSchema: {};
|
|
718
|
+
response: {};
|
|
719
|
+
} & {
|
|
720
|
+
derive: {};
|
|
721
|
+
resolve: {};
|
|
722
|
+
schema: {};
|
|
723
|
+
standaloneSchema: {};
|
|
724
|
+
response: {};
|
|
725
|
+
} & {
|
|
726
|
+
derive: {};
|
|
727
|
+
resolve: {};
|
|
728
|
+
schema: {};
|
|
729
|
+
standaloneSchema: {};
|
|
730
|
+
response: {};
|
|
731
|
+
}>>;
|
|
732
|
+
export * from './types';
|
|
733
|
+
export * from './typebox';
|
|
734
|
+
export type { AbsoluteAuthSessionStore } from './sessionTypes';
|
|
735
|
+
export { isAuthIntent, isUserSessionId, isValidUser } from './typeGuards';
|
|
736
|
+
export { AbsoluteAuthIdentityConflictError } from './errors';
|
|
737
|
+
export { sessionStore } from './sessionStore';
|
|
738
|
+
export { createInMemoryAuthSessionStore } from './authSessionStores';
|
|
739
|
+
export { createNeonAuthSessionStore } from './neonAuthSessionStore';
|
|
740
|
+
export { createLinkedProviderCredentialResolver } from './linkedProviderResolver';
|
|
741
|
+
export { createOAuthLinkedProviderCredentialResolver } from './oauthLinkedProviderResolver';
|
|
742
|
+
export { createNeonLinkedProviderStores, createNeonOAuthLinkedProviderCredentialResolver } from './neonLinkedProviders';
|
|
743
|
+
export { createInMemoryLinkedProviderStores } from './linkedProviderStores';
|
|
744
|
+
export { protectRoutePlugin } from './protectRoute';
|
|
745
|
+
export { sessionCleanup } from './sessionCleanup';
|
|
746
|
+
export { createAuthHtmxRoutes } from './htmxRoutes';
|
|
747
|
+
export { resolveAuthHtmxRenderers } from './ui/renderers';
|
|
748
|
+
export type { AuthHtmxConfig, AuthHtmxConnectorTarget, AuthHtmxProviderData, AuthHtmxProviderInfo, AuthHtmxRenderOverrides, AuthHtmxRenderersConfig, AuthHtmxUser, AuthIdentityPayload, LinkedProviderPayload } from './ui/types';
|
|
749
|
+
export * from './utils';
|
|
750
|
+
export { buildClientProviders, resolveClientProviderEntry, resolveProviderClientConfiguration } from './providerClients';
|
|
751
|
+
export type { OAuth2TokenResponse, OAuth2Client, ProviderOption, PKCEProvider, OIDCProvider, RefreshableProvider, RevocableProvider, ScopeRequiredProvider, ProvidersMap, ProviderConfiguration, CredentialsFor } from 'citra';
|
|
752
|
+
export { providers, providerOptions, refreshableProviderOptions, revocableProviderOptions, oidcProviderOptions, pkceProviderOptions, scopeRequiredProviderOptions, decodeJWT, extractPropFromIdentity, isValidProviderOption, isRefreshableOAuth2Client, isRefreshableProviderOption, isOIDCProviderOption, isPKCEProviderOption, isRevocableProviderOption, isRevocableOAuth2Client } from 'citra';
|