@absolutejs/auth 0.26.0-beta.4 → 0.26.0-beta.6
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/audit/types.d.ts +1 -1
- package/dist/index.d.ts +138 -2
- package/dist/index.js +1401 -1114
- package/dist/index.js.map +13 -8
- package/dist/portal/config.d.ts +34 -0
- package/dist/portal/inMemorySetupSessionStore.d.ts +2 -0
- package/dist/portal/operations.d.ts +10 -0
- package/dist/portal/postgresSetupSessionStore.d.ts +140 -0
- package/dist/portal/routes.d.ts +160 -0
- package/dist/portal/types.d.ts +16 -0
- package/dist/types.d.ts +12 -0
- package/dist/utils.d.ts +2 -1
- package/package.json +1 -1
package/dist/audit/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { OrganizationId } from '../tenancy';
|
|
2
|
-
export type AuditEventType = 'account_deleted' | 'authorization_denied' | 'credentials_login' | 'credentials_login_failed' | 'data_exported' | 'email_verified' | 'identity_conflict' | 'invitation_accepted' | 'invitation_created' | 'logout' | 'membership_removed' | 'mfa_challenge' | 'mfa_challenge_failed' | 'mfa_enrolled' | 'oauth_login' | 'organization_created' | 'password_reset' | 'passwordless_login' | 'register' | 'role_assigned' | 'scim_provision' | 'session_revoked' | 'sso_login' | 'token_refreshed' | 'token_revoked' | 'webauthn_authenticated' | 'webauthn_registered';
|
|
2
|
+
export type AuditEventType = 'account_deleted' | 'authorization_denied' | 'credentials_login' | 'credentials_login_failed' | 'data_exported' | 'email_verified' | 'identity_conflict' | 'invitation_accepted' | 'invitation_created' | 'logout' | 'membership_removed' | 'mfa_challenge' | 'mfa_challenge_failed' | 'mfa_enrolled' | 'oauth_login' | 'organization_created' | 'password_reset' | 'passwordless_login' | 'register' | 'role_assigned' | 'scim_provision' | 'scim_token_created' | 'session_revoked' | 'setup_session_created' | 'sso_connection_configured' | 'sso_login' | 'token_refreshed' | 'token_revoked' | 'webauthn_authenticated' | 'webauthn_registered';
|
|
3
3
|
export type AuditEvent = {
|
|
4
4
|
at: number;
|
|
5
5
|
ip?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Elysia } from 'elysia';
|
|
2
2
|
import type { AuthHtmxUser } from './htmx/types';
|
|
3
3
|
import { AuthConfig } from './types';
|
|
4
|
-
export declare const auth: <UserType>({ providersConfiguration, authorizeRoute, callbackRoute, profileRoute, signoutRoute, statusRoute, refreshRoute, revokeRoute, cleanupIntervalMs, maxSessions, sessionDurationMs, authSessionStore, audit, credentials, mfa, passwordless, lockout, sessions, sso, scim, organizations, roles, authorization, compliance, webauthn, webhooks, htmx, resolveAuthIntent, onAuthorizeSuccess, onAuthorizeError, onProfileSuccess, onProfileError, onCallbackSuccess, onLinkIdentity, onLinkIdentityConflict, onLinkConnector, onCallbackError, onStatus, onRefreshSuccess, onRefreshError, onSignOut, onRevocationSuccess, onRevocationError, onSessionCleanup }: AuthConfig<UserType>) => Promise<Elysia<"", {
|
|
4
|
+
export declare const auth: <UserType>({ providersConfiguration, authorizeRoute, callbackRoute, profileRoute, signoutRoute, statusRoute, refreshRoute, revokeRoute, cleanupIntervalMs, maxSessions, sessionDurationMs, authSessionStore, audit, credentials, mfa, passwordless, lockout, sessions, sso, scim, organizations, roles, portal, authorization, compliance, webauthn, webhooks, htmx, resolveAuthIntent, onAuthorizeSuccess, onAuthorizeError, onProfileSuccess, onProfileError, onCallbackSuccess, onLinkIdentity, onLinkIdentityConflict, onLinkConnector, onCallbackError, onStatus, onRefreshSuccess, onRefreshError, onSignOut, onRevocationSuccess, onRevocationError, onSessionCleanup }: AuthConfig<UserType>) => Promise<Elysia<"", {
|
|
5
5
|
decorator: {};
|
|
6
6
|
store: {
|
|
7
7
|
session: import("./types").SessionRecord<UserType> & import("./types").SessionRecord<unknown>;
|
|
@@ -6300,7 +6300,7 @@ export declare const auth: <UserType>({ providersConfiguration, authorizeRoute,
|
|
|
6300
6300
|
readonly message: "User is not authenticated";
|
|
6301
6301
|
}) => AuthFailReturn) | undefined) => Promise<import("elysia").ElysiaCustomStatusResponse<"Bad Request", "Cookies are missing", 400> | import("elysia").ElysiaCustomStatusResponse<"Unauthorized", "User is not authenticated", 401> | AuthReturn | NonNullable<AuthFailReturn>>;
|
|
6302
6302
|
}>;
|
|
6303
|
-
})), (((((((((((((((((({
|
|
6303
|
+
})), ((((((((((((((((((({
|
|
6304
6304
|
[x: string]: {
|
|
6305
6305
|
delete: {
|
|
6306
6306
|
body: unknown;
|
|
@@ -7598,6 +7598,136 @@ export declare const auth: <UserType>({ providersConfiguration, authorizeRoute,
|
|
|
7598
7598
|
};
|
|
7599
7599
|
};
|
|
7600
7600
|
};
|
|
7601
|
+
}))) & ({} | ({
|
|
7602
|
+
[x: string]: {
|
|
7603
|
+
session: {
|
|
7604
|
+
get: {
|
|
7605
|
+
body: unknown;
|
|
7606
|
+
params: {};
|
|
7607
|
+
query: unknown;
|
|
7608
|
+
headers: unknown;
|
|
7609
|
+
response: {
|
|
7610
|
+
200: {
|
|
7611
|
+
readonly capabilities: import(".").SetupCapability[];
|
|
7612
|
+
readonly configured: {
|
|
7613
|
+
readonly oidc: boolean;
|
|
7614
|
+
readonly saml: boolean;
|
|
7615
|
+
};
|
|
7616
|
+
readonly expiresAt: number;
|
|
7617
|
+
readonly oidc: {
|
|
7618
|
+
redirectUri: string;
|
|
7619
|
+
} | undefined;
|
|
7620
|
+
readonly organizationId: string;
|
|
7621
|
+
readonly saml: {
|
|
7622
|
+
acsUrl: string;
|
|
7623
|
+
entityId: string;
|
|
7624
|
+
metadataUrl: string;
|
|
7625
|
+
} | undefined;
|
|
7626
|
+
readonly scim: {
|
|
7627
|
+
baseUrl: string;
|
|
7628
|
+
} | undefined;
|
|
7629
|
+
};
|
|
7630
|
+
401: "Invalid or expired setup link";
|
|
7631
|
+
};
|
|
7632
|
+
};
|
|
7633
|
+
};
|
|
7634
|
+
};
|
|
7635
|
+
} & {
|
|
7636
|
+
[x: string]: {
|
|
7637
|
+
connection: {
|
|
7638
|
+
saml: {
|
|
7639
|
+
put: {
|
|
7640
|
+
body: {
|
|
7641
|
+
idpSloUrl?: string | undefined;
|
|
7642
|
+
idpEntityId: string;
|
|
7643
|
+
idpSsoUrl: string;
|
|
7644
|
+
idpX509Cert: string;
|
|
7645
|
+
};
|
|
7646
|
+
params: {};
|
|
7647
|
+
query: unknown;
|
|
7648
|
+
headers: unknown;
|
|
7649
|
+
response: {
|
|
7650
|
+
200: {
|
|
7651
|
+
readonly configured: true;
|
|
7652
|
+
readonly type: "saml";
|
|
7653
|
+
};
|
|
7654
|
+
401: "Invalid or expired setup link";
|
|
7655
|
+
403: "This setup link cannot configure SAML";
|
|
7656
|
+
422: {
|
|
7657
|
+
type: "validation";
|
|
7658
|
+
on: string;
|
|
7659
|
+
summary?: string;
|
|
7660
|
+
message?: string;
|
|
7661
|
+
found?: unknown;
|
|
7662
|
+
property?: string;
|
|
7663
|
+
expected?: string;
|
|
7664
|
+
};
|
|
7665
|
+
501: "SSO is not configured";
|
|
7666
|
+
};
|
|
7667
|
+
};
|
|
7668
|
+
};
|
|
7669
|
+
};
|
|
7670
|
+
};
|
|
7671
|
+
} & {
|
|
7672
|
+
[x: string]: {
|
|
7673
|
+
connection: {
|
|
7674
|
+
oidc: {
|
|
7675
|
+
put: {
|
|
7676
|
+
body: {
|
|
7677
|
+
redirectUri?: string | undefined;
|
|
7678
|
+
scopes?: string[] | undefined;
|
|
7679
|
+
issuer: string;
|
|
7680
|
+
clientId: string;
|
|
7681
|
+
clientSecret: string;
|
|
7682
|
+
};
|
|
7683
|
+
params: {};
|
|
7684
|
+
query: unknown;
|
|
7685
|
+
headers: unknown;
|
|
7686
|
+
response: {
|
|
7687
|
+
200: {
|
|
7688
|
+
readonly configured: true;
|
|
7689
|
+
readonly type: "oidc";
|
|
7690
|
+
};
|
|
7691
|
+
401: "Invalid or expired setup link";
|
|
7692
|
+
403: "This setup link cannot configure OIDC";
|
|
7693
|
+
422: {
|
|
7694
|
+
type: "validation";
|
|
7695
|
+
on: string;
|
|
7696
|
+
summary?: string;
|
|
7697
|
+
message?: string;
|
|
7698
|
+
found?: unknown;
|
|
7699
|
+
property?: string;
|
|
7700
|
+
expected?: string;
|
|
7701
|
+
};
|
|
7702
|
+
501: "SSO is not configured";
|
|
7703
|
+
};
|
|
7704
|
+
};
|
|
7705
|
+
};
|
|
7706
|
+
};
|
|
7707
|
+
};
|
|
7708
|
+
} & {
|
|
7709
|
+
[x: string]: {
|
|
7710
|
+
scim: {
|
|
7711
|
+
token: {
|
|
7712
|
+
post: {
|
|
7713
|
+
body: unknown;
|
|
7714
|
+
params: {};
|
|
7715
|
+
query: unknown;
|
|
7716
|
+
headers: unknown;
|
|
7717
|
+
response: {
|
|
7718
|
+
200: {
|
|
7719
|
+
readonly baseUrl: `${string}/${string}`;
|
|
7720
|
+
readonly token: string;
|
|
7721
|
+
readonly tokenId: string;
|
|
7722
|
+
};
|
|
7723
|
+
401: "Invalid or expired setup link";
|
|
7724
|
+
403: "This setup link cannot configure SCIM";
|
|
7725
|
+
501: "SCIM is not configured";
|
|
7726
|
+
};
|
|
7727
|
+
};
|
|
7728
|
+
};
|
|
7729
|
+
};
|
|
7730
|
+
};
|
|
7601
7731
|
}))) & ({} | ({
|
|
7602
7732
|
[x: string]: {
|
|
7603
7733
|
register: {
|
|
@@ -8341,3 +8471,9 @@ export * from './webhooks/config';
|
|
|
8341
8471
|
export * from './webhooks/types';
|
|
8342
8472
|
export { createWebhookDispatcher } from './webhooks/dispatcher';
|
|
8343
8473
|
export { signWebhook, verifyWebhookSignature } from './webhooks/sign';
|
|
8474
|
+
export * from './portal/config';
|
|
8475
|
+
export * from './portal/types';
|
|
8476
|
+
export { createSetupSession, resolveSetupSession } from './portal/operations';
|
|
8477
|
+
export { portalRoutes } from './portal/routes';
|
|
8478
|
+
export { createInMemorySetupSessionStore } from './portal/inMemorySetupSessionStore';
|
|
8479
|
+
export { createNeonSetupSessionStore, createPostgresSetupSessionStore, setupSessionsTable } from './portal/postgresSetupSessionStore';
|