authhero 0.230.0 → 0.232.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 +44 -44
- package/dist/authhero.d.ts +72 -1
- package/dist/authhero.mjs +2782 -2629
- package/package.json +1 -1
package/dist/authhero.d.ts
CHANGED
|
@@ -15429,6 +15429,7 @@ export type Variables = {
|
|
|
15429
15429
|
countryCode?: CountryCode;
|
|
15430
15430
|
};
|
|
15431
15431
|
export type Transaction = {
|
|
15432
|
+
id?: string;
|
|
15432
15433
|
locale: string;
|
|
15433
15434
|
login_hint?: string;
|
|
15434
15435
|
prompt?: string;
|
|
@@ -15440,6 +15441,7 @@ export type Transaction = {
|
|
|
15440
15441
|
ui_locales?: string;
|
|
15441
15442
|
};
|
|
15442
15443
|
export type HookRequest = {
|
|
15444
|
+
asn?: string;
|
|
15443
15445
|
body?: Record<string, any>;
|
|
15444
15446
|
geoip?: {
|
|
15445
15447
|
cityName?: string;
|
|
@@ -15472,6 +15474,54 @@ export type HookEvent = {
|
|
|
15472
15474
|
scope?: string;
|
|
15473
15475
|
grant_type?: string;
|
|
15474
15476
|
audience?: string;
|
|
15477
|
+
authentication?: {
|
|
15478
|
+
methods: Array<{
|
|
15479
|
+
name: string;
|
|
15480
|
+
timestamp?: string;
|
|
15481
|
+
}>;
|
|
15482
|
+
};
|
|
15483
|
+
authorization?: {
|
|
15484
|
+
roles: string[];
|
|
15485
|
+
};
|
|
15486
|
+
connection?: {
|
|
15487
|
+
id: string;
|
|
15488
|
+
name: string;
|
|
15489
|
+
strategy: string;
|
|
15490
|
+
metadata?: Record<string, any>;
|
|
15491
|
+
};
|
|
15492
|
+
organization?: {
|
|
15493
|
+
id: string;
|
|
15494
|
+
name: string;
|
|
15495
|
+
display_name: string;
|
|
15496
|
+
metadata?: Record<string, any>;
|
|
15497
|
+
};
|
|
15498
|
+
resource_server?: {
|
|
15499
|
+
identifier: string;
|
|
15500
|
+
};
|
|
15501
|
+
stats?: {
|
|
15502
|
+
logins_count: number;
|
|
15503
|
+
};
|
|
15504
|
+
tenant?: {
|
|
15505
|
+
id: string;
|
|
15506
|
+
};
|
|
15507
|
+
session?: {
|
|
15508
|
+
id?: string;
|
|
15509
|
+
created_at?: string;
|
|
15510
|
+
authenticated_at?: string;
|
|
15511
|
+
clients?: Array<{
|
|
15512
|
+
client_id: string;
|
|
15513
|
+
}>;
|
|
15514
|
+
device?: {
|
|
15515
|
+
initial_ip?: string;
|
|
15516
|
+
initial_user_agent?: string;
|
|
15517
|
+
last_ip?: string;
|
|
15518
|
+
last_user_agent?: string;
|
|
15519
|
+
};
|
|
15520
|
+
};
|
|
15521
|
+
security_context?: {
|
|
15522
|
+
ja3?: string;
|
|
15523
|
+
ja4?: string;
|
|
15524
|
+
};
|
|
15475
15525
|
};
|
|
15476
15526
|
export type OnExecuteCredentialsExchangeAPI = {
|
|
15477
15527
|
accessToken: {
|
|
@@ -15509,6 +15559,20 @@ export type OnExecutePostLoginAPI = {
|
|
|
15509
15559
|
prompt: {
|
|
15510
15560
|
render: (formId: string) => void;
|
|
15511
15561
|
};
|
|
15562
|
+
redirect: {
|
|
15563
|
+
sendUserTo: (url: string, options?: {
|
|
15564
|
+
query?: Record<string, string>;
|
|
15565
|
+
}) => void;
|
|
15566
|
+
encodeToken: (options: {
|
|
15567
|
+
secret: string;
|
|
15568
|
+
payload: Record<string, any>;
|
|
15569
|
+
expiresInSeconds?: number;
|
|
15570
|
+
}) => string;
|
|
15571
|
+
validateToken: (options: {
|
|
15572
|
+
secret: string;
|
|
15573
|
+
tokenParameterName?: string;
|
|
15574
|
+
}) => Record<string, any> | null;
|
|
15575
|
+
};
|
|
15512
15576
|
};
|
|
15513
15577
|
export type OnExecutePostLogin = (event: HookEvent, api: OnExecutePostLoginAPI) => Promise<void>;
|
|
15514
15578
|
export type SendEmailParams = {
|
|
@@ -15591,6 +15655,13 @@ export type Bindings = {
|
|
|
15591
15655
|
export interface AuthHeroConfig {
|
|
15592
15656
|
dataAdapter: DataAdapters;
|
|
15593
15657
|
allowedOrigins?: string[];
|
|
15658
|
+
hooks?: {
|
|
15659
|
+
onExecuteCredentialsExchange?: OnExecuteCredentialsExchange;
|
|
15660
|
+
onExecutePreUserRegistration?: OnExecutePreUserRegistration;
|
|
15661
|
+
onExecutePostUserRegistration?: OnExecutePostUserRegistration;
|
|
15662
|
+
onExecutePreUserUpdate?: OnExecutePreUserUpdate;
|
|
15663
|
+
onExecutePostLogin?: OnExecutePostLogin;
|
|
15664
|
+
};
|
|
15594
15665
|
}
|
|
15595
15666
|
export interface CreateX509CertificateParams {
|
|
15596
15667
|
name: string;
|
|
@@ -16020,6 +16091,7 @@ export declare function init(config: AuthHeroConfig): {
|
|
|
16020
16091
|
logo_url?: string | undefined;
|
|
16021
16092
|
} | undefined;
|
|
16022
16093
|
id?: string | undefined;
|
|
16094
|
+
display_name?: string | undefined;
|
|
16023
16095
|
token_quota?: {
|
|
16024
16096
|
client_credentials?: {
|
|
16025
16097
|
enforce?: boolean | undefined;
|
|
@@ -16027,7 +16099,6 @@ export declare function init(config: AuthHeroConfig): {
|
|
|
16027
16099
|
per_hour?: number | undefined;
|
|
16028
16100
|
} | undefined;
|
|
16029
16101
|
} | undefined;
|
|
16030
|
-
display_name?: string | undefined;
|
|
16031
16102
|
metadata?: Record<string, any> | undefined;
|
|
16032
16103
|
enabled_connections?: {
|
|
16033
16104
|
connection_id: string;
|