@absolutejs/auth 0.55.2 → 0.55.4
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/apikeys/routes.d.ts +2 -2
- package/dist/authInstance.d.ts +4 -9
- package/dist/authorization/protectPermission.d.ts +2 -2
- package/dist/compliance/routes.d.ts +2 -2
- package/dist/credentials/login.d.ts +6 -6
- package/dist/credentials/register.d.ts +2 -2
- package/dist/credentials/routes.d.ts +6 -6
- package/dist/htmx/routes.d.ts +2 -2
- package/dist/index.d.ts +2 -65
- package/dist/index.js.map +2 -2
- package/dist/mfa/challenge.d.ts +2 -2
- package/dist/mfa/management.d.ts +2 -2
- package/dist/mfa/routes.d.ts +4 -4
- package/dist/mfa/sms.d.ts +4 -4
- package/dist/mfa/totp.d.ts +2 -2
- package/dist/oidc/routes.d.ts +15 -15
- package/dist/organizations/routes.d.ts +3 -4
- package/dist/passwordless/routes.d.ts +6 -7
- package/dist/portal/routes.d.ts +3 -3
- package/dist/roles/routes.d.ts +3 -4
- package/dist/routes/callback.d.ts +2 -2
- package/dist/routes/profile.d.ts +2 -2
- package/dist/routes/protectRoute.d.ts +2 -2
- package/dist/routes/refresh.d.ts +3 -3
- package/dist/routes/revoke.d.ts +3 -3
- package/dist/routes/sessions.d.ts +5 -5
- package/dist/routes/signout.d.ts +3 -3
- package/dist/routes/stepUp.d.ts +2 -2
- package/dist/routes/userStatus.d.ts +2 -2
- package/dist/server.js.map +2 -2
- package/dist/session/cleanup.d.ts +3 -3
- package/dist/session/internalData.d.ts +34 -0
- package/dist/session/state.d.ts +3 -3
- package/dist/sso/discoveryRoute.d.ts +1 -1
- package/dist/sso/oidcRoutes.d.ts +4 -4
- package/dist/sso/samlIdpRoutes.d.ts +3 -3
- package/dist/sso/samlRoutes.d.ts +6 -7
- package/dist/webauthn/routes.d.ts +2 -2
- package/package.json +1 -1
package/dist/mfa/challenge.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ import { type MfaRouteProps } from './config';
|
|
|
3
3
|
export declare const mfaChallenge: <UserType>({ authSessionStore, challengeRoute, cookieSecure, encryptionKey, getChallengeUser, getUserId, mfaStore, onMfaChallengeError, onMfaChallengeSuccess, onSendSmsCode, sessionDurationMs, smsCodeLength, smsCodeTtlMs, smsMaxAttempts, totpMaxAttempts }: MfaRouteProps<UserType>) => Elysia<"", {
|
|
4
4
|
decorator: {};
|
|
5
5
|
store: {
|
|
6
|
-
session: import("
|
|
7
|
-
unregisteredSession: import("
|
|
6
|
+
session: import("../session/internalData").InternalSessionRecord<UserType>;
|
|
7
|
+
unregisteredSession: import("../session/internalData").InternalUnregisteredSessionRecord;
|
|
8
8
|
};
|
|
9
9
|
derive: {};
|
|
10
10
|
resolve: {};
|
package/dist/mfa/management.d.ts
CHANGED
|
@@ -14,8 +14,8 @@ export type MfaStatus = {
|
|
|
14
14
|
export declare const mfaManagementRoutes: <UserType>({ authSessionStore, getUserId, managementRoute, mfaStore }: MfaRouteProps<UserType>) => Elysia<"", {
|
|
15
15
|
decorator: {};
|
|
16
16
|
store: {
|
|
17
|
-
session: import("
|
|
18
|
-
unregisteredSession: import("
|
|
17
|
+
session: import("../session/internalData").InternalSessionRecord<UserType>;
|
|
18
|
+
unregisteredSession: import("../session/internalData").InternalUnregisteredSessionRecord;
|
|
19
19
|
};
|
|
20
20
|
derive: {};
|
|
21
21
|
resolve: {};
|
package/dist/mfa/routes.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ import type { MfaRouteProps } from './config';
|
|
|
3
3
|
export declare const mfaRoutes: <UserType>(config: MfaRouteProps<UserType>) => Elysia<"", {
|
|
4
4
|
decorator: {};
|
|
5
5
|
store: {
|
|
6
|
-
session: import("
|
|
7
|
-
unregisteredSession: import("
|
|
6
|
+
session: import("../session/internalData").InternalSessionRecord<UserType>;
|
|
7
|
+
unregisteredSession: import("../session/internalData").InternalUnregisteredSessionRecord;
|
|
8
8
|
};
|
|
9
9
|
derive: {};
|
|
10
10
|
resolve: {};
|
|
@@ -138,10 +138,10 @@ export declare const mfaRoutes: <UserType>(config: MfaRouteProps<UserType>) => E
|
|
|
138
138
|
response: {
|
|
139
139
|
400: "Phone must be in E.164 format";
|
|
140
140
|
401: "Authentication required";
|
|
141
|
-
501: "SMS MFA is not configured";
|
|
142
141
|
200: {
|
|
143
142
|
readonly phone: string;
|
|
144
143
|
};
|
|
144
|
+
501: "SMS MFA is not configured";
|
|
145
145
|
422: {
|
|
146
146
|
type: "validation";
|
|
147
147
|
on: string;
|
|
@@ -169,6 +169,7 @@ export declare const mfaRoutes: <UserType>(config: MfaRouteProps<UserType>) => E
|
|
|
169
169
|
200: {
|
|
170
170
|
readonly status: "enrolled";
|
|
171
171
|
};
|
|
172
|
+
429: "Too many attempts";
|
|
172
173
|
422: {
|
|
173
174
|
type: "validation";
|
|
174
175
|
on: string;
|
|
@@ -178,7 +179,6 @@ export declare const mfaRoutes: <UserType>(config: MfaRouteProps<UserType>) => E
|
|
|
178
179
|
property?: string;
|
|
179
180
|
expected?: string;
|
|
180
181
|
};
|
|
181
|
-
429: "Too many attempts";
|
|
182
182
|
};
|
|
183
183
|
};
|
|
184
184
|
};
|
package/dist/mfa/sms.d.ts
CHANGED
|
@@ -13,8 +13,8 @@ export declare const maskPhone: (phone: string) => string;
|
|
|
13
13
|
export declare const mfaSmsRoutes: <UserType>({ authSessionStore, getUserId, mfaStore, onMfaEnrolled, onSendSmsCode, smsCodeLength, smsCodeTtlMs, smsMaxAttempts, smsSetupRoute, smsVerifyRoute }: MfaRouteProps<UserType>) => Elysia<"", {
|
|
14
14
|
decorator: {};
|
|
15
15
|
store: {
|
|
16
|
-
session: import("
|
|
17
|
-
unregisteredSession: import("
|
|
16
|
+
session: import("../session/internalData").InternalSessionRecord<UserType>;
|
|
17
|
+
unregisteredSession: import("../session/internalData").InternalUnregisteredSessionRecord;
|
|
18
18
|
};
|
|
19
19
|
derive: {};
|
|
20
20
|
resolve: {};
|
|
@@ -40,10 +40,10 @@ export declare const mfaSmsRoutes: <UserType>({ authSessionStore, getUserId, mfa
|
|
|
40
40
|
response: {
|
|
41
41
|
400: "Phone must be in E.164 format";
|
|
42
42
|
401: "Authentication required";
|
|
43
|
-
501: "SMS MFA is not configured";
|
|
44
43
|
200: {
|
|
45
44
|
readonly phone: string;
|
|
46
45
|
};
|
|
46
|
+
501: "SMS MFA is not configured";
|
|
47
47
|
422: {
|
|
48
48
|
type: "validation";
|
|
49
49
|
on: string;
|
|
@@ -71,6 +71,7 @@ export declare const mfaSmsRoutes: <UserType>({ authSessionStore, getUserId, mfa
|
|
|
71
71
|
200: {
|
|
72
72
|
readonly status: "enrolled";
|
|
73
73
|
};
|
|
74
|
+
429: "Too many attempts";
|
|
74
75
|
422: {
|
|
75
76
|
type: "validation";
|
|
76
77
|
on: string;
|
|
@@ -80,7 +81,6 @@ export declare const mfaSmsRoutes: <UserType>({ authSessionStore, getUserId, mfa
|
|
|
80
81
|
property?: string;
|
|
81
82
|
expected?: string;
|
|
82
83
|
};
|
|
83
|
-
429: "Too many attempts";
|
|
84
84
|
};
|
|
85
85
|
};
|
|
86
86
|
};
|
package/dist/mfa/totp.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ import { type MfaRouteProps } from './config';
|
|
|
3
3
|
export declare const mfaTotpRoutes: <UserType>({ authSessionStore, backupCodeCount, encryptionKey, getUserId, issuer, mfaStore, onMfaEnrolled, totpSetupRoute, totpVerifyRoute }: MfaRouteProps<UserType>) => Elysia<"", {
|
|
4
4
|
decorator: {};
|
|
5
5
|
store: {
|
|
6
|
-
session: import("
|
|
7
|
-
unregisteredSession: import("
|
|
6
|
+
session: import("../session/internalData").InternalSessionRecord<UserType>;
|
|
7
|
+
unregisteredSession: import("../session/internalData").InternalUnregisteredSessionRecord;
|
|
8
8
|
};
|
|
9
9
|
derive: {};
|
|
10
10
|
resolve: {};
|
package/dist/oidc/routes.d.ts
CHANGED
|
@@ -6,8 +6,8 @@ export declare const oidcProviderRoutes: <UserType>(config: OidcProviderConfig<U
|
|
|
6
6
|
}) => Elysia<"", {
|
|
7
7
|
decorator: {};
|
|
8
8
|
store: {
|
|
9
|
-
session: import("
|
|
10
|
-
unregisteredSession: import("
|
|
9
|
+
session: import("../session/internalData").InternalSessionRecord<UserType>;
|
|
10
|
+
unregisteredSession: import("../session/internalData").InternalUnregisteredSessionRecord;
|
|
11
11
|
};
|
|
12
12
|
derive: {};
|
|
13
13
|
resolve: {};
|
|
@@ -27,8 +27,8 @@ export declare const oidcProviderRoutes: <UserType>(config: OidcProviderConfig<U
|
|
|
27
27
|
body: unknown;
|
|
28
28
|
params: {};
|
|
29
29
|
query: {
|
|
30
|
-
client_id?: string | undefined;
|
|
31
30
|
scope?: string | undefined;
|
|
31
|
+
client_id?: string | undefined;
|
|
32
32
|
nonce?: string | undefined;
|
|
33
33
|
claims?: string | undefined;
|
|
34
34
|
request?: string | undefined;
|
|
@@ -63,18 +63,18 @@ export declare const oidcProviderRoutes: <UserType>(config: OidcProviderConfig<U
|
|
|
63
63
|
[x: string]: {
|
|
64
64
|
post: {
|
|
65
65
|
body: {
|
|
66
|
-
|
|
66
|
+
grant_type?: string | undefined;
|
|
67
|
+
claim_token?: string | undefined;
|
|
67
68
|
scope?: string | undefined;
|
|
68
|
-
|
|
69
|
+
assertion?: string | undefined;
|
|
69
70
|
resource?: string | undefined;
|
|
71
|
+
client_id?: string | undefined;
|
|
72
|
+
audience?: string | undefined;
|
|
70
73
|
refresh_token?: string | undefined;
|
|
71
74
|
device_code?: string | undefined;
|
|
72
75
|
auth_req_id?: string | undefined;
|
|
73
|
-
grant_type?: string | undefined;
|
|
74
|
-
claim_token?: string | undefined;
|
|
75
|
-
assertion?: string | undefined;
|
|
76
|
-
code?: string | undefined;
|
|
77
76
|
client_secret?: string | undefined;
|
|
77
|
+
code?: string | undefined;
|
|
78
78
|
redirect_uri?: string | undefined;
|
|
79
79
|
client_assertion?: string | undefined;
|
|
80
80
|
client_assertion_type?: string | undefined;
|
|
@@ -104,12 +104,12 @@ export declare const oidcProviderRoutes: <UserType>(config: OidcProviderConfig<U
|
|
|
104
104
|
[x: string]: {
|
|
105
105
|
post: {
|
|
106
106
|
body: {
|
|
107
|
-
client_id?: string | undefined;
|
|
108
107
|
scope?: string | undefined;
|
|
108
|
+
resource?: string | undefined;
|
|
109
|
+
client_id?: string | undefined;
|
|
109
110
|
nonce?: string | undefined;
|
|
110
111
|
audience?: string | undefined;
|
|
111
112
|
claims?: string | undefined;
|
|
112
|
-
resource?: string | undefined;
|
|
113
113
|
client_secret?: string | undefined;
|
|
114
114
|
redirect_uri?: string | undefined;
|
|
115
115
|
acr_values?: string | undefined;
|
|
@@ -199,8 +199,8 @@ export declare const oidcProviderRoutes: <UserType>(config: OidcProviderConfig<U
|
|
|
199
199
|
[x: string]: {
|
|
200
200
|
post: {
|
|
201
201
|
body: {
|
|
202
|
-
client_id?: string | undefined;
|
|
203
202
|
scope?: string | undefined;
|
|
203
|
+
client_id?: string | undefined;
|
|
204
204
|
client_secret?: string | undefined;
|
|
205
205
|
login_hint?: string | undefined;
|
|
206
206
|
binding_message?: string | undefined;
|
|
@@ -228,8 +228,8 @@ export declare const oidcProviderRoutes: <UserType>(config: OidcProviderConfig<U
|
|
|
228
228
|
[x: string]: {
|
|
229
229
|
post: {
|
|
230
230
|
body: {
|
|
231
|
-
client_id?: string | undefined;
|
|
232
231
|
scope?: string | undefined;
|
|
232
|
+
client_id?: string | undefined;
|
|
233
233
|
client_secret?: string | undefined;
|
|
234
234
|
};
|
|
235
235
|
params: {};
|
|
@@ -331,8 +331,8 @@ export declare const oidcProviderRoutes: <UserType>(config: OidcProviderConfig<U
|
|
|
331
331
|
[x: string]: {
|
|
332
332
|
post: {
|
|
333
333
|
body: {
|
|
334
|
-
jwks?: any;
|
|
335
334
|
scope?: string | undefined;
|
|
335
|
+
jwks?: any;
|
|
336
336
|
backchannel_logout_uri?: string | undefined;
|
|
337
337
|
client_name?: string | undefined;
|
|
338
338
|
grant_types?: string[] | undefined;
|
|
@@ -391,8 +391,8 @@ export declare const oidcProviderRoutes: <UserType>(config: OidcProviderConfig<U
|
|
|
391
391
|
":clientId": {
|
|
392
392
|
put: {
|
|
393
393
|
body: {
|
|
394
|
-
jwks?: any;
|
|
395
394
|
scope?: string | undefined;
|
|
395
|
+
jwks?: any;
|
|
396
396
|
backchannel_logout_uri?: string | undefined;
|
|
397
397
|
client_name?: string | undefined;
|
|
398
398
|
grant_types?: string[] | undefined;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { Elysia } from 'elysia';
|
|
2
|
-
import type { SessionRecord } from '../types';
|
|
3
2
|
import { type OrganizationsRouteProps } from './config';
|
|
4
3
|
export declare const organizationRoutes: <UserType>({ authSessionStore, canCreateOrganization, canManageMembers, emit, getUserId, invitationDurationMs, onMembershipAdded, onMembershipRemoved, onOrganizationCreated, onSendInvitation, organizationsRoute, organizationStore, ownerRoles }: OrganizationsRouteProps<UserType>) => Elysia<"", {
|
|
5
4
|
decorator: {};
|
|
6
5
|
store: {
|
|
7
|
-
session:
|
|
8
|
-
unregisteredSession: import("
|
|
6
|
+
session: import("../session/internalData").InternalSessionRecord<UserType>;
|
|
7
|
+
unregisteredSession: import("../session/internalData").InternalUnregisteredSessionRecord;
|
|
9
8
|
};
|
|
10
9
|
derive: {};
|
|
11
10
|
resolve: {};
|
|
@@ -162,10 +161,10 @@ export declare const organizationRoutes: <UserType>({ authSessionStore, canCreat
|
|
|
162
161
|
response: {
|
|
163
162
|
401: "Authentication required";
|
|
164
163
|
403: "Cannot manage members";
|
|
165
|
-
404: "Invitation not found";
|
|
166
164
|
200: {
|
|
167
165
|
readonly revoked: string;
|
|
168
166
|
};
|
|
167
|
+
404: "Invitation not found";
|
|
169
168
|
422: {
|
|
170
169
|
type: "validation";
|
|
171
170
|
on: string;
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { Elysia } from 'elysia';
|
|
2
|
-
import type { SessionRecord } from '../types';
|
|
3
2
|
import { type PasswordlessRouteProps } from './config';
|
|
4
3
|
export declare const passwordlessRoutes: <UserType>({ authSessionStore, cookieSecure, emit, getUserByEmail, getUserId, magicLinkTokenDurationMs, onCreateUser, onPasswordlessLogin, onSendMagicLink, onSendOtp, otpDurationMs, otpLength, passwordlessRoute, passwordlessTokenStore, sessionDurationMs }: PasswordlessRouteProps<UserType>) => Elysia<"", {
|
|
5
4
|
decorator: {};
|
|
6
5
|
store: {} | {
|
|
7
|
-
session:
|
|
8
|
-
unregisteredSession: import("
|
|
6
|
+
session: import("../session/internalData").InternalSessionRecord<UserType>;
|
|
7
|
+
unregisteredSession: import("../session/internalData").InternalUnregisteredSessionRecord;
|
|
9
8
|
} | {
|
|
10
|
-
session:
|
|
11
|
-
unregisteredSession: import("
|
|
9
|
+
session: import("../session/internalData").InternalSessionRecord<UserType>;
|
|
10
|
+
unregisteredSession: import("../session/internalData").InternalUnregisteredSessionRecord;
|
|
12
11
|
} | {
|
|
13
|
-
session:
|
|
14
|
-
unregisteredSession: import("
|
|
12
|
+
session: import("../session/internalData").InternalSessionRecord<UserType>;
|
|
13
|
+
unregisteredSession: import("../session/internalData").InternalUnregisteredSessionRecord;
|
|
15
14
|
};
|
|
16
15
|
derive: {};
|
|
17
16
|
resolve: {};
|
package/dist/portal/routes.d.ts
CHANGED
|
@@ -66,11 +66,11 @@ export declare const portalRoutes: ({ emit, onScimTokenCreated, onSsoConnectionC
|
|
|
66
66
|
response: {
|
|
67
67
|
401: "Invalid or expired setup link";
|
|
68
68
|
403: "This setup link cannot configure SAML";
|
|
69
|
-
501: "SSO is not configured";
|
|
70
69
|
200: {
|
|
71
70
|
readonly configured: true;
|
|
72
71
|
readonly type: "saml";
|
|
73
72
|
};
|
|
73
|
+
501: "SSO is not configured";
|
|
74
74
|
422: {
|
|
75
75
|
type: "validation";
|
|
76
76
|
on: string;
|
|
@@ -103,11 +103,11 @@ export declare const portalRoutes: ({ emit, onScimTokenCreated, onSsoConnectionC
|
|
|
103
103
|
response: {
|
|
104
104
|
401: "Invalid or expired setup link";
|
|
105
105
|
403: "This setup link cannot configure OIDC";
|
|
106
|
-
501: "SSO is not configured";
|
|
107
106
|
200: {
|
|
108
107
|
readonly configured: true;
|
|
109
108
|
readonly type: "oidc";
|
|
110
109
|
};
|
|
110
|
+
501: "SSO is not configured";
|
|
111
111
|
422: {
|
|
112
112
|
type: "validation";
|
|
113
113
|
on: string;
|
|
@@ -134,12 +134,12 @@ export declare const portalRoutes: ({ emit, onScimTokenCreated, onSsoConnectionC
|
|
|
134
134
|
response: {
|
|
135
135
|
401: "Invalid or expired setup link";
|
|
136
136
|
403: "This setup link cannot configure SCIM";
|
|
137
|
-
501: "SCIM is not configured";
|
|
138
137
|
200: {
|
|
139
138
|
readonly baseUrl: `${string}/${string}`;
|
|
140
139
|
readonly token: string;
|
|
141
140
|
readonly tokenId: string;
|
|
142
141
|
};
|
|
142
|
+
501: "SCIM is not configured";
|
|
143
143
|
};
|
|
144
144
|
};
|
|
145
145
|
};
|
package/dist/roles/routes.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { Elysia } from 'elysia';
|
|
2
|
-
import type { SessionRecord } from '../types';
|
|
3
2
|
import { type RolesRouteProps } from './config';
|
|
4
3
|
export declare const roleRoutes: <UserType>({ authSessionStore, canManageRoles, emit, getUserId, onRolesAssigned, organizationStore, roleStore, rolesRoute }: RolesRouteProps<UserType>) => Elysia<"", {
|
|
5
4
|
decorator: {};
|
|
6
5
|
store: {
|
|
7
|
-
session:
|
|
8
|
-
unregisteredSession: import("
|
|
6
|
+
session: import("../session/internalData").InternalSessionRecord<UserType>;
|
|
7
|
+
unregisteredSession: import("../session/internalData").InternalUnregisteredSessionRecord;
|
|
9
8
|
};
|
|
10
9
|
derive: {};
|
|
11
10
|
resolve: {};
|
|
@@ -66,10 +65,10 @@ export declare const roleRoutes: <UserType>({ authSessionStore, canManageRoles,
|
|
|
66
65
|
response: {
|
|
67
66
|
401: "Authentication required";
|
|
68
67
|
403: "Cannot manage roles";
|
|
69
|
-
404: "Membership not found";
|
|
70
68
|
200: {
|
|
71
69
|
readonly roles: string[];
|
|
72
70
|
};
|
|
71
|
+
404: "Membership not found";
|
|
73
72
|
422: {
|
|
74
73
|
type: "validation";
|
|
75
74
|
on: string;
|
|
@@ -15,8 +15,8 @@ type CallbackProps<UserType> = {
|
|
|
15
15
|
export declare const callback: <UserType>({ authSessionStore, clientProviders, callbackRoute, resolveAuthIntent, onCallbackSuccess, onLinkIdentity, onLinkIdentityConflict, onLinkConnector, onCallbackError }: CallbackProps<UserType>) => Elysia<"", {
|
|
16
16
|
decorator: {};
|
|
17
17
|
store: {
|
|
18
|
-
session: import("
|
|
19
|
-
unregisteredSession: import("
|
|
18
|
+
session: import("../session/internalData").InternalSessionRecord<UserType>;
|
|
19
|
+
unregisteredSession: import("../session/internalData").InternalUnregisteredSessionRecord;
|
|
20
20
|
};
|
|
21
21
|
derive: {};
|
|
22
22
|
resolve: {};
|
package/dist/routes/profile.d.ts
CHANGED
|
@@ -9,8 +9,8 @@ type ProfileProps = {
|
|
|
9
9
|
export declare const profile: <UserType>({ clientProviders, profileRoute, onProfileSuccess, onProfileError }: ProfileProps) => Elysia<"", {
|
|
10
10
|
decorator: {};
|
|
11
11
|
store: {
|
|
12
|
-
session: import("
|
|
13
|
-
unregisteredSession: import("
|
|
12
|
+
session: import("../session/internalData").InternalSessionRecord<UserType>;
|
|
13
|
+
unregisteredSession: import("../session/internalData").InternalUnregisteredSessionRecord;
|
|
14
14
|
};
|
|
15
15
|
derive: {};
|
|
16
16
|
resolve: {};
|
|
@@ -12,8 +12,8 @@ export declare const protectRoutePlugin: <UserType>({ authSessionStore }?: {
|
|
|
12
12
|
}) => Elysia<"", {
|
|
13
13
|
decorator: {};
|
|
14
14
|
store: {
|
|
15
|
-
session: import("
|
|
16
|
-
unregisteredSession: import("
|
|
15
|
+
session: import("../session/internalData").InternalSessionRecord<UserType>;
|
|
16
|
+
unregisteredSession: import("../session/internalData").InternalUnregisteredSessionRecord;
|
|
17
17
|
};
|
|
18
18
|
derive: {
|
|
19
19
|
readonly protectRoute: <AuthReturn, AuthFailReturn>(handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: (error: AuthFailError) => AuthFailReturn) => Promise<AuthReturn | import("elysia").ElysiaCustomStatusResponse<"Bad Request", "Cookies are missing", 400> | NonNullable<AuthFailReturn> | import("elysia").ElysiaCustomStatusResponse<"Unauthorized", "User is not authenticated", 401>>;
|
package/dist/routes/refresh.d.ts
CHANGED
|
@@ -12,8 +12,8 @@ type RefreshProps<UserType> = {
|
|
|
12
12
|
export declare const refresh: <UserType>({ authSessionStore, clientProviders, refreshRoute, onRefreshSuccess, onRefreshError, sessionDurationMs }: RefreshProps<UserType>) => Elysia<"", {
|
|
13
13
|
decorator: {};
|
|
14
14
|
store: {
|
|
15
|
-
session: import("
|
|
16
|
-
unregisteredSession: import("
|
|
15
|
+
session: import("../session/internalData").InternalSessionRecord<UserType>;
|
|
16
|
+
unregisteredSession: import("../session/internalData").InternalUnregisteredSessionRecord;
|
|
17
17
|
};
|
|
18
18
|
derive: {};
|
|
19
19
|
resolve: {};
|
|
@@ -37,8 +37,8 @@ export declare const refresh: <UserType>({ authSessionStore, clientProviders, re
|
|
|
37
37
|
response: {
|
|
38
38
|
400: "Cookies are missing" | "Invalid provider" | "No refresh token found";
|
|
39
39
|
401: "Provider is required" | "Client provider not found" | "Client variant is required" | "Client variant not found" | "No auth provider found" | "No user session found";
|
|
40
|
-
501: "Provider is not refreshable";
|
|
41
40
|
200: Response;
|
|
41
|
+
501: "Provider is not refreshable";
|
|
42
42
|
422: {
|
|
43
43
|
type: "validation";
|
|
44
44
|
on: string;
|
package/dist/routes/revoke.d.ts
CHANGED
|
@@ -11,8 +11,8 @@ type RevokeProps<UserType> = {
|
|
|
11
11
|
export declare const revoke: <UserType>({ authSessionStore, clientProviders, revokeRoute, onRevocationSuccess, onRevocationError }: RevokeProps<UserType>) => Elysia<"", {
|
|
12
12
|
decorator: {};
|
|
13
13
|
store: {
|
|
14
|
-
session: import("
|
|
15
|
-
unregisteredSession: import("
|
|
14
|
+
session: import("../session/internalData").InternalSessionRecord<UserType>;
|
|
15
|
+
unregisteredSession: import("../session/internalData").InternalUnregisteredSessionRecord;
|
|
16
16
|
};
|
|
17
17
|
derive: {};
|
|
18
18
|
resolve: {};
|
|
@@ -36,8 +36,8 @@ export declare const revoke: <UserType>({ authSessionStore, clientProviders, rev
|
|
|
36
36
|
response: {
|
|
37
37
|
400: "Cookies are missing" | "Invalid provider" | "Session has no access token to revoke";
|
|
38
38
|
401: "Provider is required" | "Client provider not found" | "Client variant is required" | "Client variant not found" | "No auth provider found" | "No user session found";
|
|
39
|
-
501: "Provider does not support revocation";
|
|
40
39
|
200: Response;
|
|
40
|
+
501: "Provider does not support revocation";
|
|
41
41
|
422: {
|
|
42
42
|
type: "validation";
|
|
43
43
|
on: string;
|
|
@@ -10,8 +10,8 @@ type SessionSummary = {
|
|
|
10
10
|
export declare const sessionRoutes: <UserType>({ authSessionStore, getUserId, sessionsRoute }: SessionsRouteProps<UserType>) => Elysia<"", {
|
|
11
11
|
decorator: {};
|
|
12
12
|
store: {
|
|
13
|
-
session: import("
|
|
14
|
-
unregisteredSession: import("
|
|
13
|
+
session: import("../session/internalData").InternalSessionRecord<UserType>;
|
|
14
|
+
unregisteredSession: import("../session/internalData").InternalUnregisteredSessionRecord;
|
|
15
15
|
};
|
|
16
16
|
derive: {};
|
|
17
17
|
resolve: {};
|
|
@@ -34,10 +34,10 @@ export declare const sessionRoutes: <UserType>({ authSessionStore, getUserId, se
|
|
|
34
34
|
headers: unknown;
|
|
35
35
|
response: {
|
|
36
36
|
401: "Authentication required";
|
|
37
|
-
501: "Session management requires an authSessionStore";
|
|
38
37
|
200: {
|
|
39
38
|
readonly sessions: SessionSummary[];
|
|
40
39
|
};
|
|
40
|
+
501: "Session management requires an authSessionStore";
|
|
41
41
|
422: {
|
|
42
42
|
type: "validation";
|
|
43
43
|
on: string;
|
|
@@ -63,11 +63,11 @@ export declare const sessionRoutes: <UserType>({ authSessionStore, getUserId, se
|
|
|
63
63
|
response: {
|
|
64
64
|
400: "Invalid session id";
|
|
65
65
|
401: "Authentication required";
|
|
66
|
-
501: "Session management requires an authSessionStore";
|
|
67
|
-
404: "Session not found";
|
|
68
66
|
200: {
|
|
69
67
|
readonly revoked: `${string}-${string}-${string}-${string}-${string}`;
|
|
70
68
|
};
|
|
69
|
+
501: "Session management requires an authSessionStore";
|
|
70
|
+
404: "Session not found";
|
|
71
71
|
422: {
|
|
72
72
|
type: "validation";
|
|
73
73
|
on: string;
|
package/dist/routes/signout.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Elysia } from 'elysia';
|
|
2
2
|
import type { AuthSessionStore } from '../session/types';
|
|
3
|
-
import { OnSignOut, RouteString
|
|
3
|
+
import { OnSignOut, RouteString } from '../types';
|
|
4
4
|
type SignOutProps<UserType> = {
|
|
5
5
|
authSessionStore?: AuthSessionStore<UserType>;
|
|
6
6
|
signoutRoute?: RouteString;
|
|
@@ -9,8 +9,8 @@ type SignOutProps<UserType> = {
|
|
|
9
9
|
export declare const signout: <UserType>({ authSessionStore, signoutRoute, onSignOut }: SignOutProps<UserType>) => Elysia<"", {
|
|
10
10
|
decorator: {};
|
|
11
11
|
store: {
|
|
12
|
-
session:
|
|
13
|
-
unregisteredSession: import("
|
|
12
|
+
session: import("../session/internalData").InternalSessionRecord<UserType>;
|
|
13
|
+
unregisteredSession: import("../session/internalData").InternalUnregisteredSessionRecord;
|
|
14
14
|
};
|
|
15
15
|
derive: {};
|
|
16
16
|
resolve: {};
|
package/dist/routes/stepUp.d.ts
CHANGED
|
@@ -9,8 +9,8 @@ export declare const stepUpPlugin: <UserType>({ authSessionStore }?: {
|
|
|
9
9
|
}) => Elysia<"", {
|
|
10
10
|
decorator: {};
|
|
11
11
|
store: {
|
|
12
|
-
session: import("
|
|
13
|
-
unregisteredSession: import("
|
|
12
|
+
session: import("../session/internalData").InternalSessionRecord<UserType>;
|
|
13
|
+
unregisteredSession: import("../session/internalData").InternalUnregisteredSessionRecord;
|
|
14
14
|
};
|
|
15
15
|
derive: {
|
|
16
16
|
readonly requireRecentAuth: <AuthReturn, AuthFailReturn>(maxAgeMs: number, handleAuth: (user: UserType) => AuthReturn | Promise<AuthReturn>, handleAuthFail?: (error: ReauthFailError) => AuthFailReturn) => Promise<AuthReturn | import("elysia").ElysiaCustomStatusResponse<"Unauthorized", "Recent authentication required", 401> | NonNullable<AuthFailReturn>>;
|
|
@@ -9,8 +9,8 @@ type StatusProps<UserType> = {
|
|
|
9
9
|
export declare const userStatus: <UserType>({ authSessionStore, statusRoute, onStatus }: StatusProps<UserType>) => Elysia<"", {
|
|
10
10
|
decorator: {};
|
|
11
11
|
store: {
|
|
12
|
-
session: import("
|
|
13
|
-
unregisteredSession: import("
|
|
12
|
+
session: import("../session/internalData").InternalSessionRecord<UserType>;
|
|
13
|
+
unregisteredSession: import("../session/internalData").InternalUnregisteredSessionRecord;
|
|
14
14
|
};
|
|
15
15
|
derive: {};
|
|
16
16
|
resolve: {};
|