authhero 0.231.0 → 0.233.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/dist/authhero.cjs +47 -47
- package/dist/authhero.d.ts +72 -7
- package/dist/authhero.mjs +3163 -3008
- package/package.json +3 -3
package/dist/authhero.d.ts
CHANGED
|
@@ -8417,8 +8417,6 @@ declare const LegacyClientSchema: z.ZodObject<{
|
|
|
8417
8417
|
response_mode?: AuthorizationResponseMode | undefined;
|
|
8418
8418
|
enabled_clients?: string[] | undefined;
|
|
8419
8419
|
}>, "many">;
|
|
8420
|
-
disable_sign_ups: z.ZodBoolean;
|
|
8421
|
-
email_validation: z.ZodString;
|
|
8422
8420
|
client_id: z.ZodString;
|
|
8423
8421
|
name: z.ZodString;
|
|
8424
8422
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -8569,8 +8567,6 @@ declare const LegacyClientSchema: z.ZodObject<{
|
|
|
8569
8567
|
response_mode?: AuthorizationResponseMode | undefined;
|
|
8570
8568
|
enabled_clients?: string[] | undefined;
|
|
8571
8569
|
}[];
|
|
8572
|
-
disable_sign_ups: boolean;
|
|
8573
|
-
email_validation: string;
|
|
8574
8570
|
description?: string | undefined;
|
|
8575
8571
|
refresh_token?: Record<string, any> | undefined;
|
|
8576
8572
|
client_secret?: string | undefined;
|
|
@@ -8655,8 +8651,6 @@ declare const LegacyClientSchema: z.ZodObject<{
|
|
|
8655
8651
|
response_mode?: AuthorizationResponseMode | undefined;
|
|
8656
8652
|
enabled_clients?: string[] | undefined;
|
|
8657
8653
|
}[];
|
|
8658
|
-
disable_sign_ups: boolean;
|
|
8659
|
-
email_validation: string;
|
|
8660
8654
|
description?: string | undefined;
|
|
8661
8655
|
refresh_token?: Record<string, any> | undefined;
|
|
8662
8656
|
global?: boolean | undefined;
|
|
@@ -15429,6 +15423,7 @@ export type Variables = {
|
|
|
15429
15423
|
countryCode?: CountryCode;
|
|
15430
15424
|
};
|
|
15431
15425
|
export type Transaction = {
|
|
15426
|
+
id?: string;
|
|
15432
15427
|
locale: string;
|
|
15433
15428
|
login_hint?: string;
|
|
15434
15429
|
prompt?: string;
|
|
@@ -15440,6 +15435,7 @@ export type Transaction = {
|
|
|
15440
15435
|
ui_locales?: string;
|
|
15441
15436
|
};
|
|
15442
15437
|
export type HookRequest = {
|
|
15438
|
+
asn?: string;
|
|
15443
15439
|
body?: Record<string, any>;
|
|
15444
15440
|
geoip?: {
|
|
15445
15441
|
cityName?: string;
|
|
@@ -15472,6 +15468,54 @@ export type HookEvent = {
|
|
|
15472
15468
|
scope?: string;
|
|
15473
15469
|
grant_type?: string;
|
|
15474
15470
|
audience?: string;
|
|
15471
|
+
authentication?: {
|
|
15472
|
+
methods: Array<{
|
|
15473
|
+
name: string;
|
|
15474
|
+
timestamp?: string;
|
|
15475
|
+
}>;
|
|
15476
|
+
};
|
|
15477
|
+
authorization?: {
|
|
15478
|
+
roles: string[];
|
|
15479
|
+
};
|
|
15480
|
+
connection?: {
|
|
15481
|
+
id: string;
|
|
15482
|
+
name: string;
|
|
15483
|
+
strategy: string;
|
|
15484
|
+
metadata?: Record<string, any>;
|
|
15485
|
+
};
|
|
15486
|
+
organization?: {
|
|
15487
|
+
id: string;
|
|
15488
|
+
name: string;
|
|
15489
|
+
display_name: string;
|
|
15490
|
+
metadata?: Record<string, any>;
|
|
15491
|
+
};
|
|
15492
|
+
resource_server?: {
|
|
15493
|
+
identifier: string;
|
|
15494
|
+
};
|
|
15495
|
+
stats?: {
|
|
15496
|
+
logins_count: number;
|
|
15497
|
+
};
|
|
15498
|
+
tenant?: {
|
|
15499
|
+
id: string;
|
|
15500
|
+
};
|
|
15501
|
+
session?: {
|
|
15502
|
+
id?: string;
|
|
15503
|
+
created_at?: string;
|
|
15504
|
+
authenticated_at?: string;
|
|
15505
|
+
clients?: Array<{
|
|
15506
|
+
client_id: string;
|
|
15507
|
+
}>;
|
|
15508
|
+
device?: {
|
|
15509
|
+
initial_ip?: string;
|
|
15510
|
+
initial_user_agent?: string;
|
|
15511
|
+
last_ip?: string;
|
|
15512
|
+
last_user_agent?: string;
|
|
15513
|
+
};
|
|
15514
|
+
};
|
|
15515
|
+
security_context?: {
|
|
15516
|
+
ja3?: string;
|
|
15517
|
+
ja4?: string;
|
|
15518
|
+
};
|
|
15475
15519
|
};
|
|
15476
15520
|
export type OnExecuteCredentialsExchangeAPI = {
|
|
15477
15521
|
accessToken: {
|
|
@@ -15509,6 +15553,20 @@ export type OnExecutePostLoginAPI = {
|
|
|
15509
15553
|
prompt: {
|
|
15510
15554
|
render: (formId: string) => void;
|
|
15511
15555
|
};
|
|
15556
|
+
redirect: {
|
|
15557
|
+
sendUserTo: (url: string, options?: {
|
|
15558
|
+
query?: Record<string, string>;
|
|
15559
|
+
}) => void;
|
|
15560
|
+
encodeToken: (options: {
|
|
15561
|
+
secret: string;
|
|
15562
|
+
payload: Record<string, any>;
|
|
15563
|
+
expiresInSeconds?: number;
|
|
15564
|
+
}) => string;
|
|
15565
|
+
validateToken: (options: {
|
|
15566
|
+
secret: string;
|
|
15567
|
+
tokenParameterName?: string;
|
|
15568
|
+
}) => Record<string, any> | null;
|
|
15569
|
+
};
|
|
15512
15570
|
};
|
|
15513
15571
|
export type OnExecutePostLogin = (event: HookEvent, api: OnExecutePostLoginAPI) => Promise<void>;
|
|
15514
15572
|
export type SendEmailParams = {
|
|
@@ -15591,6 +15649,13 @@ export type Bindings = {
|
|
|
15591
15649
|
export interface AuthHeroConfig {
|
|
15592
15650
|
dataAdapter: DataAdapters;
|
|
15593
15651
|
allowedOrigins?: string[];
|
|
15652
|
+
hooks?: {
|
|
15653
|
+
onExecuteCredentialsExchange?: OnExecuteCredentialsExchange;
|
|
15654
|
+
onExecutePreUserRegistration?: OnExecutePreUserRegistration;
|
|
15655
|
+
onExecutePostUserRegistration?: OnExecutePostUserRegistration;
|
|
15656
|
+
onExecutePreUserUpdate?: OnExecutePreUserUpdate;
|
|
15657
|
+
onExecutePostLogin?: OnExecutePostLogin;
|
|
15658
|
+
};
|
|
15594
15659
|
}
|
|
15595
15660
|
export interface CreateX509CertificateParams {
|
|
15596
15661
|
name: string;
|
|
@@ -16020,6 +16085,7 @@ export declare function init(config: AuthHeroConfig): {
|
|
|
16020
16085
|
logo_url?: string | undefined;
|
|
16021
16086
|
} | undefined;
|
|
16022
16087
|
id?: string | undefined;
|
|
16088
|
+
display_name?: string | undefined;
|
|
16023
16089
|
token_quota?: {
|
|
16024
16090
|
client_credentials?: {
|
|
16025
16091
|
enforce?: boolean | undefined;
|
|
@@ -16027,7 +16093,6 @@ export declare function init(config: AuthHeroConfig): {
|
|
|
16027
16093
|
per_hour?: number | undefined;
|
|
16028
16094
|
} | undefined;
|
|
16029
16095
|
} | undefined;
|
|
16030
|
-
display_name?: string | undefined;
|
|
16031
16096
|
metadata?: Record<string, any> | undefined;
|
|
16032
16097
|
enabled_connections?: {
|
|
16033
16098
|
connection_id: string;
|