@absolutejs/auth 0.27.0-beta.10 → 0.27.0-beta.11
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/actions.d.ts +27 -0
- package/dist/index.d.ts +8 -3
- package/dist/index.js +9106 -8946
- package/dist/index.js.map +14 -10
- package/dist/oidc/config.d.ts +6 -0
- package/dist/oidc/routes.d.ts +3 -3
- package/dist/organizations/operations.d.ts +7 -0
- package/dist/vault/config.d.ts +20 -0
- package/dist/vault/inMemoryVaultStore.d.ts +2 -0
- package/dist/vault/postgresVaultStore.d.ts +100 -0
- package/dist/vault/types.d.ts +14 -0
- package/package.json +1 -1
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type AuthEventName = 'postLogin' | 'postLogout' | 'postMfa' | 'postOauthCallback' | 'postRegister' | 'preLogin' | 'preRegister';
|
|
2
|
+
export type AuthActionContext<UserType> = {
|
|
3
|
+
email?: string;
|
|
4
|
+
event: AuthEventName;
|
|
5
|
+
ip?: string;
|
|
6
|
+
metadata?: Record<string, unknown>;
|
|
7
|
+
user?: UserType;
|
|
8
|
+
userAgent?: string;
|
|
9
|
+
};
|
|
10
|
+
export type AuthActionResult = {
|
|
11
|
+
kind: 'deny';
|
|
12
|
+
reason: string;
|
|
13
|
+
} | {
|
|
14
|
+
kind: 'pass';
|
|
15
|
+
} | {
|
|
16
|
+
kind: 'redirect';
|
|
17
|
+
url: string;
|
|
18
|
+
};
|
|
19
|
+
export type AuthAction<UserType> = {
|
|
20
|
+
event: AuthEventName | AuthEventName[];
|
|
21
|
+
handler: (context: AuthActionContext<UserType>) => AuthActionResult | Promise<AuthActionResult>;
|
|
22
|
+
name: string;
|
|
23
|
+
};
|
|
24
|
+
export type AuthPipeline<UserType> = {
|
|
25
|
+
run: (event: AuthEventName, context: Omit<AuthActionContext<UserType>, 'event'>) => Promise<AuthActionResult>;
|
|
26
|
+
};
|
|
27
|
+
export declare const createActionPipeline: <UserType>(actions: AuthAction<UserType>[]) => AuthPipeline<UserType>;
|
package/dist/index.d.ts
CHANGED
|
@@ -13450,9 +13450,9 @@ export declare const auth: <UserType>({ providersConfiguration, authorizeRoute,
|
|
|
13450
13450
|
body: unknown;
|
|
13451
13451
|
params: {};
|
|
13452
13452
|
query: {
|
|
13453
|
-
nonce?: string | undefined;
|
|
13454
13453
|
client_id?: string | undefined;
|
|
13455
13454
|
scope?: string | undefined;
|
|
13455
|
+
nonce?: string | undefined;
|
|
13456
13456
|
code_challenge?: string | undefined;
|
|
13457
13457
|
code_challenge_method?: string | undefined;
|
|
13458
13458
|
redirect_uri?: string | undefined;
|
|
@@ -13478,10 +13478,10 @@ export declare const auth: <UserType>({ providersConfiguration, authorizeRoute,
|
|
|
13478
13478
|
[x: string]: {
|
|
13479
13479
|
post: {
|
|
13480
13480
|
body: {
|
|
13481
|
-
audience?: string | undefined;
|
|
13482
|
-
resource?: string | undefined;
|
|
13483
13481
|
client_id?: string | undefined;
|
|
13484
13482
|
scope?: string | undefined;
|
|
13483
|
+
audience?: string | undefined;
|
|
13484
|
+
resource?: string | undefined;
|
|
13485
13485
|
refresh_token?: string | undefined;
|
|
13486
13486
|
client_secret?: string | undefined;
|
|
13487
13487
|
grant_type?: string | undefined;
|
|
@@ -14635,8 +14635,13 @@ export declare const auth: <UserType>({ providersConfiguration, authorizeRoute,
|
|
|
14635
14635
|
standaloneSchema: {};
|
|
14636
14636
|
response: {};
|
|
14637
14637
|
}>>;
|
|
14638
|
+
export * from './actions';
|
|
14638
14639
|
export * from './types';
|
|
14639
14640
|
export * from './typebox';
|
|
14641
|
+
export * from './vault/config';
|
|
14642
|
+
export * from './vault/types';
|
|
14643
|
+
export { createInMemoryVaultStore } from './vault/inMemoryVaultStore';
|
|
14644
|
+
export { createNeonVaultStore, createPostgresVaultStore, vaultEntriesTable } from './vault/postgresVaultStore';
|
|
14640
14645
|
export type { AuthSessionStore } from './session/types';
|
|
14641
14646
|
export { isAuthIntent, isUserSessionId, isValidUser } from './typeGuards';
|
|
14642
14647
|
export { AuthIdentityConflictError } from './errors';
|