@authhero/adapter-interfaces 4.14.0 → 4.16.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/adapter-interfaces.cjs +1 -1
- package/dist/adapter-interfaces.d.ts +374 -6
- package/dist/adapter-interfaces.mjs +738 -677
- package/dist/tsconfig.types.tsbuildinfo +1 -1
- package/dist/types/adapters/TokenExchangeProfiles.d.ts +14 -0
- package/dist/types/adapters/index.d.ts +8 -0
- package/dist/types/types/Client.d.ts +6 -0
- package/dist/types/types/Code.d.ts +3 -0
- package/dist/types/types/Forms.d.ts +48 -0
- package/dist/types/types/JWKS.d.ts +6 -4
- package/dist/types/types/TokenExchangeProfile.d.ts +284 -0
- package/dist/types/types/codeHookApiShapes.d.ts +6 -0
- package/dist/types/types/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TokenExchangeProfile, TokenExchangeProfileInsert, TokenExchangeProfileUpdate } from "../types/TokenExchangeProfile";
|
|
2
|
+
import { CreateOptions } from "../types/ImportMetadata";
|
|
3
|
+
export interface TokenExchangeProfilesAdapter {
|
|
4
|
+
create(tenant_id: string, profile: TokenExchangeProfileInsert, options?: CreateOptions): Promise<TokenExchangeProfile>;
|
|
5
|
+
get(tenant_id: string, id: string): Promise<TokenExchangeProfile | null>;
|
|
6
|
+
/**
|
|
7
|
+
* All profiles for the tenant, oldest first. Tenants hold a handful of
|
|
8
|
+
* profiles, so the management API pages in memory and the token endpoint
|
|
9
|
+
* resolves a `subject_token_type` from this list.
|
|
10
|
+
*/
|
|
11
|
+
list(tenant_id: string): Promise<TokenExchangeProfile[]>;
|
|
12
|
+
update(tenant_id: string, id: string, profile: TokenExchangeProfileUpdate): Promise<boolean>;
|
|
13
|
+
remove(tenant_id: string, id: string): Promise<boolean>;
|
|
14
|
+
}
|
|
@@ -25,6 +25,7 @@ import { ThemesAdapter } from "./Themes";
|
|
|
25
25
|
import { LoginSessionsAdapter } from "./LoginSessions";
|
|
26
26
|
import { PromptSettingsAdapter } from "./PromptSettings";
|
|
27
27
|
import { ProxyRoutesAdapter } from "./ProxyRoutes";
|
|
28
|
+
import { TokenExchangeProfilesAdapter } from "./TokenExchangeProfiles";
|
|
28
29
|
import { ScimConfigurationsAdapter } from "./ScimConfigurations";
|
|
29
30
|
import { ScimTokensAdapter } from "./ScimTokens";
|
|
30
31
|
import { ScimExternalIdsAdapter } from "./ScimExternalIds";
|
|
@@ -151,6 +152,12 @@ export interface DataAdapters {
|
|
|
151
152
|
*/
|
|
152
153
|
analytics?: AnalyticsAdapter;
|
|
153
154
|
tenants: TenantsDataAdapter;
|
|
155
|
+
/**
|
|
156
|
+
* Optional Custom Token Exchange profiles (issue #1417). When set, the
|
|
157
|
+
* `/api/v2/token-exchange-profiles` management API is mounted and the
|
|
158
|
+
* token-exchange grant accepts customer-defined `subject_token_type`s.
|
|
159
|
+
*/
|
|
160
|
+
tokenExchangeProfiles?: TokenExchangeProfilesAdapter;
|
|
154
161
|
/**
|
|
155
162
|
* Optional control-plane log of durable tenant lifecycle operations
|
|
156
163
|
* (provision / seed / upgrade / backup / deprovision — issue #1026).
|
|
@@ -280,6 +287,7 @@ export * from "./Logs";
|
|
|
280
287
|
export * from "./Passwords";
|
|
281
288
|
export * from "./PromptSettings";
|
|
282
289
|
export * from "./ProxyRoutes";
|
|
290
|
+
export * from "./TokenExchangeProfiles";
|
|
283
291
|
export * from "./ScimConfigurations";
|
|
284
292
|
export * from "./ScimTokens";
|
|
285
293
|
export * from "./ScimExternalIds";
|
|
@@ -125,6 +125,9 @@ export declare const clientInsertSchema: z.ZodObject<{
|
|
|
125
125
|
iat_dcr: "iat_dcr";
|
|
126
126
|
}>>;
|
|
127
127
|
registration_metadata: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
128
|
+
token_exchange: z.ZodOptional<z.ZodObject<{
|
|
129
|
+
allow_any_profile_of_type: z.ZodOptional<z.ZodArray<z.ZodLiteral<"custom_authentication">>>;
|
|
130
|
+
}, z.core.$strip>>;
|
|
128
131
|
user_linking_mode: z.ZodOptional<z.ZodEnum<{
|
|
129
132
|
builtin: "builtin";
|
|
130
133
|
off: "off";
|
|
@@ -258,6 +261,9 @@ export declare const clientSchema: z.ZodObject<{
|
|
|
258
261
|
iat_dcr: "iat_dcr";
|
|
259
262
|
}>>;
|
|
260
263
|
registration_metadata: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
264
|
+
token_exchange: z.ZodOptional<z.ZodObject<{
|
|
265
|
+
allow_any_profile_of_type: z.ZodOptional<z.ZodArray<z.ZodLiteral<"custom_authentication">>>;
|
|
266
|
+
}, z.core.$strip>>;
|
|
261
267
|
user_linking_mode: z.ZodOptional<z.ZodEnum<{
|
|
262
268
|
builtin: "builtin";
|
|
263
269
|
off: "off";
|
|
@@ -8,6 +8,7 @@ export declare const codeTypeSchema: z.ZodEnum<{
|
|
|
8
8
|
oauth2_state: "oauth2_state";
|
|
9
9
|
ticket: "ticket";
|
|
10
10
|
client_assertion_jti: "client_assertion_jti";
|
|
11
|
+
subject_token_jti: "subject_token_jti";
|
|
11
12
|
}>;
|
|
12
13
|
export type CodeType = z.infer<typeof codeTypeSchema>;
|
|
13
14
|
export declare const codeInsertSchema: z.ZodObject<{
|
|
@@ -23,6 +24,7 @@ export declare const codeInsertSchema: z.ZodObject<{
|
|
|
23
24
|
oauth2_state: "oauth2_state";
|
|
24
25
|
ticket: "ticket";
|
|
25
26
|
client_assertion_jti: "client_assertion_jti";
|
|
27
|
+
subject_token_jti: "subject_token_jti";
|
|
26
28
|
}>;
|
|
27
29
|
code_verifier: z.ZodOptional<z.ZodString>;
|
|
28
30
|
code_challenge: z.ZodOptional<z.ZodString>;
|
|
@@ -52,6 +54,7 @@ export declare const codeSchema: z.ZodObject<{
|
|
|
52
54
|
oauth2_state: "oauth2_state";
|
|
53
55
|
ticket: "ticket";
|
|
54
56
|
client_assertion_jti: "client_assertion_jti";
|
|
57
|
+
subject_token_jti: "subject_token_jti";
|
|
55
58
|
}>;
|
|
56
59
|
code_verifier: z.ZodOptional<z.ZodString>;
|
|
57
60
|
code_challenge: z.ZodOptional<z.ZodString>;
|
|
@@ -62,6 +62,11 @@ declare const nextButtonComponent: z.ZodObject<{
|
|
|
62
62
|
type: z.ZodLiteral<"NEXT_BUTTON">;
|
|
63
63
|
config: z.ZodObject<{
|
|
64
64
|
text: z.ZodOptional<z.ZodString>;
|
|
65
|
+
variant: z.ZodOptional<z.ZodEnum<{
|
|
66
|
+
primary: "primary";
|
|
67
|
+
secondary: "secondary";
|
|
68
|
+
}>>;
|
|
69
|
+
skip_validation: z.ZodOptional<z.ZodBoolean>;
|
|
65
70
|
}, z.core.$strip>;
|
|
66
71
|
}, z.core.$strip>;
|
|
67
72
|
declare const previousButtonComponent: z.ZodObject<{
|
|
@@ -516,6 +521,7 @@ declare const socialField: z.ZodObject<{
|
|
|
516
521
|
name: z.ZodString;
|
|
517
522
|
strategy: z.ZodOptional<z.ZodString>;
|
|
518
523
|
display_name: z.ZodOptional<z.ZodString>;
|
|
524
|
+
short_name: z.ZodOptional<z.ZodString>;
|
|
519
525
|
icon_url: z.ZodOptional<z.ZodString>;
|
|
520
526
|
href: z.ZodOptional<z.ZodString>;
|
|
521
527
|
last_used: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -690,6 +696,11 @@ export declare const blockComponentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
690
696
|
type: z.ZodLiteral<"NEXT_BUTTON">;
|
|
691
697
|
config: z.ZodObject<{
|
|
692
698
|
text: z.ZodOptional<z.ZodString>;
|
|
699
|
+
variant: z.ZodOptional<z.ZodEnum<{
|
|
700
|
+
primary: "primary";
|
|
701
|
+
secondary: "secondary";
|
|
702
|
+
}>>;
|
|
703
|
+
skip_validation: z.ZodOptional<z.ZodBoolean>;
|
|
693
704
|
}, z.core.$strip>;
|
|
694
705
|
}, z.core.$strip>, z.ZodObject<{
|
|
695
706
|
id: z.ZodString;
|
|
@@ -1157,6 +1168,7 @@ export declare const fieldComponentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
1157
1168
|
name: z.ZodString;
|
|
1158
1169
|
strategy: z.ZodOptional<z.ZodString>;
|
|
1159
1170
|
display_name: z.ZodOptional<z.ZodString>;
|
|
1171
|
+
short_name: z.ZodOptional<z.ZodString>;
|
|
1160
1172
|
icon_url: z.ZodOptional<z.ZodString>;
|
|
1161
1173
|
href: z.ZodOptional<z.ZodString>;
|
|
1162
1174
|
last_used: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1303,6 +1315,11 @@ export declare const formNodeComponentDefinition: z.ZodUnion<readonly [z.ZodDisc
|
|
|
1303
1315
|
type: z.ZodLiteral<"NEXT_BUTTON">;
|
|
1304
1316
|
config: z.ZodObject<{
|
|
1305
1317
|
text: z.ZodOptional<z.ZodString>;
|
|
1318
|
+
variant: z.ZodOptional<z.ZodEnum<{
|
|
1319
|
+
primary: "primary";
|
|
1320
|
+
secondary: "secondary";
|
|
1321
|
+
}>>;
|
|
1322
|
+
skip_validation: z.ZodOptional<z.ZodBoolean>;
|
|
1306
1323
|
}, z.core.$strip>;
|
|
1307
1324
|
}, z.core.$strip>, z.ZodObject<{
|
|
1308
1325
|
id: z.ZodString;
|
|
@@ -1762,6 +1779,7 @@ export declare const formNodeComponentDefinition: z.ZodUnion<readonly [z.ZodDisc
|
|
|
1762
1779
|
name: z.ZodString;
|
|
1763
1780
|
strategy: z.ZodOptional<z.ZodString>;
|
|
1764
1781
|
display_name: z.ZodOptional<z.ZodString>;
|
|
1782
|
+
short_name: z.ZodOptional<z.ZodString>;
|
|
1765
1783
|
icon_url: z.ZodOptional<z.ZodString>;
|
|
1766
1784
|
href: z.ZodOptional<z.ZodString>;
|
|
1767
1785
|
last_used: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1999,6 +2017,11 @@ declare const stepNodeSchema: z.ZodObject<{
|
|
|
1999
2017
|
type: z.ZodLiteral<"NEXT_BUTTON">;
|
|
2000
2018
|
config: z.ZodObject<{
|
|
2001
2019
|
text: z.ZodOptional<z.ZodString>;
|
|
2020
|
+
variant: z.ZodOptional<z.ZodEnum<{
|
|
2021
|
+
primary: "primary";
|
|
2022
|
+
secondary: "secondary";
|
|
2023
|
+
}>>;
|
|
2024
|
+
skip_validation: z.ZodOptional<z.ZodBoolean>;
|
|
2002
2025
|
}, z.core.$strip>;
|
|
2003
2026
|
}, z.core.$strip>, z.ZodObject<{
|
|
2004
2027
|
id: z.ZodString;
|
|
@@ -2458,6 +2481,7 @@ declare const stepNodeSchema: z.ZodObject<{
|
|
|
2458
2481
|
name: z.ZodString;
|
|
2459
2482
|
strategy: z.ZodOptional<z.ZodString>;
|
|
2460
2483
|
display_name: z.ZodOptional<z.ZodString>;
|
|
2484
|
+
short_name: z.ZodOptional<z.ZodString>;
|
|
2461
2485
|
icon_url: z.ZodOptional<z.ZodString>;
|
|
2462
2486
|
href: z.ZodOptional<z.ZodString>;
|
|
2463
2487
|
last_used: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -2642,6 +2666,11 @@ export declare const formNodeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2642
2666
|
type: z.ZodLiteral<"NEXT_BUTTON">;
|
|
2643
2667
|
config: z.ZodObject<{
|
|
2644
2668
|
text: z.ZodOptional<z.ZodString>;
|
|
2669
|
+
variant: z.ZodOptional<z.ZodEnum<{
|
|
2670
|
+
primary: "primary";
|
|
2671
|
+
secondary: "secondary";
|
|
2672
|
+
}>>;
|
|
2673
|
+
skip_validation: z.ZodOptional<z.ZodBoolean>;
|
|
2645
2674
|
}, z.core.$strip>;
|
|
2646
2675
|
}, z.core.$strip>, z.ZodObject<{
|
|
2647
2676
|
id: z.ZodString;
|
|
@@ -3101,6 +3130,7 @@ export declare const formNodeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
3101
3130
|
name: z.ZodString;
|
|
3102
3131
|
strategy: z.ZodOptional<z.ZodString>;
|
|
3103
3132
|
display_name: z.ZodOptional<z.ZodString>;
|
|
3133
|
+
short_name: z.ZodOptional<z.ZodString>;
|
|
3104
3134
|
icon_url: z.ZodOptional<z.ZodString>;
|
|
3105
3135
|
href: z.ZodOptional<z.ZodString>;
|
|
3106
3136
|
last_used: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -3303,6 +3333,11 @@ export declare const formInsertSchema: z.ZodObject<{
|
|
|
3303
3333
|
type: z.ZodLiteral<"NEXT_BUTTON">;
|
|
3304
3334
|
config: z.ZodObject<{
|
|
3305
3335
|
text: z.ZodOptional<z.ZodString>;
|
|
3336
|
+
variant: z.ZodOptional<z.ZodEnum<{
|
|
3337
|
+
primary: "primary";
|
|
3338
|
+
secondary: "secondary";
|
|
3339
|
+
}>>;
|
|
3340
|
+
skip_validation: z.ZodOptional<z.ZodBoolean>;
|
|
3306
3341
|
}, z.core.$strip>;
|
|
3307
3342
|
}, z.core.$strip>, z.ZodObject<{
|
|
3308
3343
|
id: z.ZodString;
|
|
@@ -3762,6 +3797,7 @@ export declare const formInsertSchema: z.ZodObject<{
|
|
|
3762
3797
|
name: z.ZodString;
|
|
3763
3798
|
strategy: z.ZodOptional<z.ZodString>;
|
|
3764
3799
|
display_name: z.ZodOptional<z.ZodString>;
|
|
3800
|
+
short_name: z.ZodOptional<z.ZodString>;
|
|
3765
3801
|
icon_url: z.ZodOptional<z.ZodString>;
|
|
3766
3802
|
href: z.ZodOptional<z.ZodString>;
|
|
3767
3803
|
last_used: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -3996,6 +4032,11 @@ export declare const formSchema: z.ZodObject<{
|
|
|
3996
4032
|
type: z.ZodLiteral<"NEXT_BUTTON">;
|
|
3997
4033
|
config: z.ZodObject<{
|
|
3998
4034
|
text: z.ZodOptional<z.ZodString>;
|
|
4035
|
+
variant: z.ZodOptional<z.ZodEnum<{
|
|
4036
|
+
primary: "primary";
|
|
4037
|
+
secondary: "secondary";
|
|
4038
|
+
}>>;
|
|
4039
|
+
skip_validation: z.ZodOptional<z.ZodBoolean>;
|
|
3999
4040
|
}, z.core.$strip>;
|
|
4000
4041
|
}, z.core.$strip>, z.ZodObject<{
|
|
4001
4042
|
id: z.ZodString;
|
|
@@ -4455,6 +4496,7 @@ export declare const formSchema: z.ZodObject<{
|
|
|
4455
4496
|
name: z.ZodString;
|
|
4456
4497
|
strategy: z.ZodOptional<z.ZodString>;
|
|
4457
4498
|
display_name: z.ZodOptional<z.ZodString>;
|
|
4499
|
+
short_name: z.ZodOptional<z.ZodString>;
|
|
4458
4500
|
icon_url: z.ZodOptional<z.ZodString>;
|
|
4459
4501
|
href: z.ZodOptional<z.ZodString>;
|
|
4460
4502
|
last_used: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -4680,6 +4722,11 @@ export declare const uiScreenSchema: z.ZodObject<{
|
|
|
4680
4722
|
type: z.ZodLiteral<"NEXT_BUTTON">;
|
|
4681
4723
|
config: z.ZodObject<{
|
|
4682
4724
|
text: z.ZodOptional<z.ZodString>;
|
|
4725
|
+
variant: z.ZodOptional<z.ZodEnum<{
|
|
4726
|
+
primary: "primary";
|
|
4727
|
+
secondary: "secondary";
|
|
4728
|
+
}>>;
|
|
4729
|
+
skip_validation: z.ZodOptional<z.ZodBoolean>;
|
|
4683
4730
|
}, z.core.$strip>;
|
|
4684
4731
|
}, z.core.$strip>, z.ZodObject<{
|
|
4685
4732
|
id: z.ZodString;
|
|
@@ -5139,6 +5186,7 @@ export declare const uiScreenSchema: z.ZodObject<{
|
|
|
5139
5186
|
name: z.ZodString;
|
|
5140
5187
|
strategy: z.ZodOptional<z.ZodString>;
|
|
5141
5188
|
display_name: z.ZodOptional<z.ZodString>;
|
|
5189
|
+
short_name: z.ZodOptional<z.ZodString>;
|
|
5142
5190
|
icon_url: z.ZodOptional<z.ZodString>;
|
|
5143
5191
|
href: z.ZodOptional<z.ZodString>;
|
|
5144
5192
|
last_used: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "@hono/zod-openapi";
|
|
2
2
|
export declare const jwksSchema: z.ZodObject<{
|
|
3
|
-
alg: z.ZodEnum<{
|
|
3
|
+
alg: z.ZodOptional<z.ZodEnum<{
|
|
4
4
|
RS256: "RS256";
|
|
5
5
|
RS384: "RS384";
|
|
6
6
|
RS512: "RS512";
|
|
@@ -10,7 +10,7 @@ export declare const jwksSchema: z.ZodObject<{
|
|
|
10
10
|
HS256: "HS256";
|
|
11
11
|
HS384: "HS384";
|
|
12
12
|
HS512: "HS512";
|
|
13
|
-
}
|
|
13
|
+
}>>;
|
|
14
14
|
kid: z.ZodOptional<z.ZodString>;
|
|
15
15
|
kty: z.ZodEnum<{
|
|
16
16
|
RSA: "RSA";
|
|
@@ -27,11 +27,12 @@ export declare const jwksSchema: z.ZodObject<{
|
|
|
27
27
|
x: z.ZodOptional<z.ZodString>;
|
|
28
28
|
y: z.ZodOptional<z.ZodString>;
|
|
29
29
|
x5t: z.ZodOptional<z.ZodString>;
|
|
30
|
+
"x5t#S256": z.ZodOptional<z.ZodString>;
|
|
30
31
|
x5c: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
31
32
|
}, z.core.$strip>;
|
|
32
33
|
export declare const jwksKeySchema: z.ZodObject<{
|
|
33
34
|
keys: z.ZodArray<z.ZodObject<{
|
|
34
|
-
alg: z.ZodEnum<{
|
|
35
|
+
alg: z.ZodOptional<z.ZodEnum<{
|
|
35
36
|
RS256: "RS256";
|
|
36
37
|
RS384: "RS384";
|
|
37
38
|
RS512: "RS512";
|
|
@@ -41,7 +42,7 @@ export declare const jwksKeySchema: z.ZodObject<{
|
|
|
41
42
|
HS256: "HS256";
|
|
42
43
|
HS384: "HS384";
|
|
43
44
|
HS512: "HS512";
|
|
44
|
-
}
|
|
45
|
+
}>>;
|
|
45
46
|
kid: z.ZodOptional<z.ZodString>;
|
|
46
47
|
kty: z.ZodEnum<{
|
|
47
48
|
RSA: "RSA";
|
|
@@ -58,6 +59,7 @@ export declare const jwksKeySchema: z.ZodObject<{
|
|
|
58
59
|
x: z.ZodOptional<z.ZodString>;
|
|
59
60
|
y: z.ZodOptional<z.ZodString>;
|
|
60
61
|
x5t: z.ZodOptional<z.ZodString>;
|
|
62
|
+
"x5t#S256": z.ZodOptional<z.ZodString>;
|
|
61
63
|
x5c: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
62
64
|
}, z.core.$strip>>;
|
|
63
65
|
}, z.core.$strip>;
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
import { z } from "@hono/zod-openapi";
|
|
2
|
+
/**
|
|
3
|
+
* Custom Token Exchange profiles (Auth0-compatible, issue #1417).
|
|
4
|
+
*
|
|
5
|
+
* A profile maps an RFC 8693 `subject_token_type` to the logic that validates
|
|
6
|
+
* a customer-issued subject token and decides which user the exchange issues
|
|
7
|
+
* tokens for. Auth0 only supports that logic as an Action (`action_id`).
|
|
8
|
+
* AuthHero additionally supports a declarative `jwt_verification` block so the
|
|
9
|
+
* common "verify our signed JWT against our JWKS" case needs no code.
|
|
10
|
+
* Exactly one of `action_id` and `jwt_verification` is set on a profile.
|
|
11
|
+
*/
|
|
12
|
+
export declare const TOKEN_EXCHANGE_PROFILE_TYPE: "custom_authentication";
|
|
13
|
+
/**
|
|
14
|
+
* Namespaces a profile may not claim. `urn:ietf:params:oauth` holds the
|
|
15
|
+
* standard RFC 8693 token types that AuthHero handles natively; the vendor
|
|
16
|
+
* namespaces are reserved by Auth0.
|
|
17
|
+
*/
|
|
18
|
+
export declare const RESERVED_SUBJECT_TOKEN_TYPE_PREFIXES: readonly ["urn:ietf:params:oauth:", "urn:auth0", "urn:okta", "http://auth0.com", "https://auth0.com", "http://okta.com", "https://okta.com"];
|
|
19
|
+
export declare const subjectTokenTypeSchema: z.ZodString;
|
|
20
|
+
export declare const tokenExchangeJwtAlgorithmSchema: z.ZodEnum<{
|
|
21
|
+
RS256: "RS256";
|
|
22
|
+
RS384: "RS384";
|
|
23
|
+
RS512: "RS512";
|
|
24
|
+
ES256: "ES256";
|
|
25
|
+
ES384: "ES384";
|
|
26
|
+
ES512: "ES512";
|
|
27
|
+
}>;
|
|
28
|
+
export type TokenExchangeJwtAlgorithm = z.infer<typeof tokenExchangeJwtAlgorithmSchema>;
|
|
29
|
+
export declare const tokenExchangeUserMappingSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
30
|
+
type: z.ZodLiteral<"connection">;
|
|
31
|
+
connection: z.ZodString;
|
|
32
|
+
create_if_not_exists: z.ZodDefault<z.ZodBoolean>;
|
|
33
|
+
trust_email_verified: z.ZodDefault<z.ZodBoolean>;
|
|
34
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
35
|
+
type: z.ZodLiteral<"user_id">;
|
|
36
|
+
}, z.core.$strip>], "type">;
|
|
37
|
+
export type TokenExchangeUserMapping = z.infer<typeof tokenExchangeUserMappingSchema>;
|
|
38
|
+
export declare const tokenExchangeJwtVerificationSchema: z.ZodObject<{
|
|
39
|
+
issuer: z.ZodString;
|
|
40
|
+
jwks: z.ZodOptional<z.ZodObject<{
|
|
41
|
+
keys: z.ZodArray<z.ZodObject<{
|
|
42
|
+
alg: z.ZodOptional<z.ZodEnum<{
|
|
43
|
+
RS256: "RS256";
|
|
44
|
+
RS384: "RS384";
|
|
45
|
+
RS512: "RS512";
|
|
46
|
+
ES256: "ES256";
|
|
47
|
+
ES384: "ES384";
|
|
48
|
+
ES512: "ES512";
|
|
49
|
+
HS256: "HS256";
|
|
50
|
+
HS384: "HS384";
|
|
51
|
+
HS512: "HS512";
|
|
52
|
+
}>>;
|
|
53
|
+
kid: z.ZodOptional<z.ZodString>;
|
|
54
|
+
kty: z.ZodEnum<{
|
|
55
|
+
RSA: "RSA";
|
|
56
|
+
EC: "EC";
|
|
57
|
+
oct: "oct";
|
|
58
|
+
}>;
|
|
59
|
+
use: z.ZodOptional<z.ZodEnum<{
|
|
60
|
+
sig: "sig";
|
|
61
|
+
enc: "enc";
|
|
62
|
+
}>>;
|
|
63
|
+
n: z.ZodOptional<z.ZodString>;
|
|
64
|
+
e: z.ZodOptional<z.ZodString>;
|
|
65
|
+
crv: z.ZodOptional<z.ZodString>;
|
|
66
|
+
x: z.ZodOptional<z.ZodString>;
|
|
67
|
+
y: z.ZodOptional<z.ZodString>;
|
|
68
|
+
x5t: z.ZodOptional<z.ZodString>;
|
|
69
|
+
"x5t#S256": z.ZodOptional<z.ZodString>;
|
|
70
|
+
x5c: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
71
|
+
}, z.core.$strip>>;
|
|
72
|
+
}, z.core.$strip>>;
|
|
73
|
+
jwks_uri: z.ZodOptional<z.ZodString>;
|
|
74
|
+
audience: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
75
|
+
algorithms: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
76
|
+
RS256: "RS256";
|
|
77
|
+
RS384: "RS384";
|
|
78
|
+
RS512: "RS512";
|
|
79
|
+
ES256: "ES256";
|
|
80
|
+
ES384: "ES384";
|
|
81
|
+
ES512: "ES512";
|
|
82
|
+
}>>>;
|
|
83
|
+
max_lifetime_seconds: z.ZodDefault<z.ZodNumber>;
|
|
84
|
+
require_jti: z.ZodDefault<z.ZodBoolean>;
|
|
85
|
+
user_mapping: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
86
|
+
type: z.ZodLiteral<"connection">;
|
|
87
|
+
connection: z.ZodString;
|
|
88
|
+
create_if_not_exists: z.ZodDefault<z.ZodBoolean>;
|
|
89
|
+
trust_email_verified: z.ZodDefault<z.ZodBoolean>;
|
|
90
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
91
|
+
type: z.ZodLiteral<"user_id">;
|
|
92
|
+
}, z.core.$strip>], "type">;
|
|
93
|
+
}, z.core.$strip>;
|
|
94
|
+
export type TokenExchangeJwtVerification = z.infer<typeof tokenExchangeJwtVerificationSchema>;
|
|
95
|
+
export declare const tokenExchangeProfileInsertSchema: z.ZodObject<{
|
|
96
|
+
name: z.ZodString;
|
|
97
|
+
subject_token_type: z.ZodString;
|
|
98
|
+
action_id: z.ZodOptional<z.ZodString>;
|
|
99
|
+
type: z.ZodLiteral<"custom_authentication">;
|
|
100
|
+
jwt_verification: z.ZodOptional<z.ZodObject<{
|
|
101
|
+
issuer: z.ZodString;
|
|
102
|
+
jwks: z.ZodOptional<z.ZodObject<{
|
|
103
|
+
keys: z.ZodArray<z.ZodObject<{
|
|
104
|
+
alg: z.ZodOptional<z.ZodEnum<{
|
|
105
|
+
RS256: "RS256";
|
|
106
|
+
RS384: "RS384";
|
|
107
|
+
RS512: "RS512";
|
|
108
|
+
ES256: "ES256";
|
|
109
|
+
ES384: "ES384";
|
|
110
|
+
ES512: "ES512";
|
|
111
|
+
HS256: "HS256";
|
|
112
|
+
HS384: "HS384";
|
|
113
|
+
HS512: "HS512";
|
|
114
|
+
}>>;
|
|
115
|
+
kid: z.ZodOptional<z.ZodString>;
|
|
116
|
+
kty: z.ZodEnum<{
|
|
117
|
+
RSA: "RSA";
|
|
118
|
+
EC: "EC";
|
|
119
|
+
oct: "oct";
|
|
120
|
+
}>;
|
|
121
|
+
use: z.ZodOptional<z.ZodEnum<{
|
|
122
|
+
sig: "sig";
|
|
123
|
+
enc: "enc";
|
|
124
|
+
}>>;
|
|
125
|
+
n: z.ZodOptional<z.ZodString>;
|
|
126
|
+
e: z.ZodOptional<z.ZodString>;
|
|
127
|
+
crv: z.ZodOptional<z.ZodString>;
|
|
128
|
+
x: z.ZodOptional<z.ZodString>;
|
|
129
|
+
y: z.ZodOptional<z.ZodString>;
|
|
130
|
+
x5t: z.ZodOptional<z.ZodString>;
|
|
131
|
+
"x5t#S256": z.ZodOptional<z.ZodString>;
|
|
132
|
+
x5c: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
133
|
+
}, z.core.$strip>>;
|
|
134
|
+
}, z.core.$strip>>;
|
|
135
|
+
jwks_uri: z.ZodOptional<z.ZodString>;
|
|
136
|
+
audience: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
137
|
+
algorithms: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
138
|
+
RS256: "RS256";
|
|
139
|
+
RS384: "RS384";
|
|
140
|
+
RS512: "RS512";
|
|
141
|
+
ES256: "ES256";
|
|
142
|
+
ES384: "ES384";
|
|
143
|
+
ES512: "ES512";
|
|
144
|
+
}>>>;
|
|
145
|
+
max_lifetime_seconds: z.ZodDefault<z.ZodNumber>;
|
|
146
|
+
require_jti: z.ZodDefault<z.ZodBoolean>;
|
|
147
|
+
user_mapping: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
148
|
+
type: z.ZodLiteral<"connection">;
|
|
149
|
+
connection: z.ZodString;
|
|
150
|
+
create_if_not_exists: z.ZodDefault<z.ZodBoolean>;
|
|
151
|
+
trust_email_verified: z.ZodDefault<z.ZodBoolean>;
|
|
152
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
153
|
+
type: z.ZodLiteral<"user_id">;
|
|
154
|
+
}, z.core.$strip>], "type">;
|
|
155
|
+
}, z.core.$strip>>;
|
|
156
|
+
}, z.core.$strip>;
|
|
157
|
+
export type TokenExchangeProfileInsert = z.input<typeof tokenExchangeProfileInsertSchema>;
|
|
158
|
+
export declare const tokenExchangeProfileSchema: z.ZodObject<{
|
|
159
|
+
name: z.ZodString;
|
|
160
|
+
subject_token_type: z.ZodString;
|
|
161
|
+
action_id: z.ZodOptional<z.ZodString>;
|
|
162
|
+
type: z.ZodLiteral<"custom_authentication">;
|
|
163
|
+
jwt_verification: z.ZodOptional<z.ZodObject<{
|
|
164
|
+
issuer: z.ZodString;
|
|
165
|
+
jwks: z.ZodOptional<z.ZodObject<{
|
|
166
|
+
keys: z.ZodArray<z.ZodObject<{
|
|
167
|
+
alg: z.ZodOptional<z.ZodEnum<{
|
|
168
|
+
RS256: "RS256";
|
|
169
|
+
RS384: "RS384";
|
|
170
|
+
RS512: "RS512";
|
|
171
|
+
ES256: "ES256";
|
|
172
|
+
ES384: "ES384";
|
|
173
|
+
ES512: "ES512";
|
|
174
|
+
HS256: "HS256";
|
|
175
|
+
HS384: "HS384";
|
|
176
|
+
HS512: "HS512";
|
|
177
|
+
}>>;
|
|
178
|
+
kid: z.ZodOptional<z.ZodString>;
|
|
179
|
+
kty: z.ZodEnum<{
|
|
180
|
+
RSA: "RSA";
|
|
181
|
+
EC: "EC";
|
|
182
|
+
oct: "oct";
|
|
183
|
+
}>;
|
|
184
|
+
use: z.ZodOptional<z.ZodEnum<{
|
|
185
|
+
sig: "sig";
|
|
186
|
+
enc: "enc";
|
|
187
|
+
}>>;
|
|
188
|
+
n: z.ZodOptional<z.ZodString>;
|
|
189
|
+
e: z.ZodOptional<z.ZodString>;
|
|
190
|
+
crv: z.ZodOptional<z.ZodString>;
|
|
191
|
+
x: z.ZodOptional<z.ZodString>;
|
|
192
|
+
y: z.ZodOptional<z.ZodString>;
|
|
193
|
+
x5t: z.ZodOptional<z.ZodString>;
|
|
194
|
+
"x5t#S256": z.ZodOptional<z.ZodString>;
|
|
195
|
+
x5c: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
196
|
+
}, z.core.$strip>>;
|
|
197
|
+
}, z.core.$strip>>;
|
|
198
|
+
jwks_uri: z.ZodOptional<z.ZodString>;
|
|
199
|
+
audience: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
200
|
+
algorithms: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
201
|
+
RS256: "RS256";
|
|
202
|
+
RS384: "RS384";
|
|
203
|
+
RS512: "RS512";
|
|
204
|
+
ES256: "ES256";
|
|
205
|
+
ES384: "ES384";
|
|
206
|
+
ES512: "ES512";
|
|
207
|
+
}>>>;
|
|
208
|
+
max_lifetime_seconds: z.ZodDefault<z.ZodNumber>;
|
|
209
|
+
require_jti: z.ZodDefault<z.ZodBoolean>;
|
|
210
|
+
user_mapping: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
211
|
+
type: z.ZodLiteral<"connection">;
|
|
212
|
+
connection: z.ZodString;
|
|
213
|
+
create_if_not_exists: z.ZodDefault<z.ZodBoolean>;
|
|
214
|
+
trust_email_verified: z.ZodDefault<z.ZodBoolean>;
|
|
215
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
216
|
+
type: z.ZodLiteral<"user_id">;
|
|
217
|
+
}, z.core.$strip>], "type">;
|
|
218
|
+
}, z.core.$strip>>;
|
|
219
|
+
id: z.ZodString;
|
|
220
|
+
created_at: z.ZodString;
|
|
221
|
+
updated_at: z.ZodString;
|
|
222
|
+
}, z.core.$strip>;
|
|
223
|
+
export type TokenExchangeProfile = z.infer<typeof tokenExchangeProfileSchema>;
|
|
224
|
+
export declare const tokenExchangeProfileUpdateSchema: z.ZodObject<{
|
|
225
|
+
name: z.ZodOptional<z.ZodString>;
|
|
226
|
+
subject_token_type: z.ZodOptional<z.ZodString>;
|
|
227
|
+
jwt_verification: z.ZodOptional<z.ZodObject<{
|
|
228
|
+
issuer: z.ZodString;
|
|
229
|
+
jwks: z.ZodOptional<z.ZodObject<{
|
|
230
|
+
keys: z.ZodArray<z.ZodObject<{
|
|
231
|
+
alg: z.ZodOptional<z.ZodEnum<{
|
|
232
|
+
RS256: "RS256";
|
|
233
|
+
RS384: "RS384";
|
|
234
|
+
RS512: "RS512";
|
|
235
|
+
ES256: "ES256";
|
|
236
|
+
ES384: "ES384";
|
|
237
|
+
ES512: "ES512";
|
|
238
|
+
HS256: "HS256";
|
|
239
|
+
HS384: "HS384";
|
|
240
|
+
HS512: "HS512";
|
|
241
|
+
}>>;
|
|
242
|
+
kid: z.ZodOptional<z.ZodString>;
|
|
243
|
+
kty: z.ZodEnum<{
|
|
244
|
+
RSA: "RSA";
|
|
245
|
+
EC: "EC";
|
|
246
|
+
oct: "oct";
|
|
247
|
+
}>;
|
|
248
|
+
use: z.ZodOptional<z.ZodEnum<{
|
|
249
|
+
sig: "sig";
|
|
250
|
+
enc: "enc";
|
|
251
|
+
}>>;
|
|
252
|
+
n: z.ZodOptional<z.ZodString>;
|
|
253
|
+
e: z.ZodOptional<z.ZodString>;
|
|
254
|
+
crv: z.ZodOptional<z.ZodString>;
|
|
255
|
+
x: z.ZodOptional<z.ZodString>;
|
|
256
|
+
y: z.ZodOptional<z.ZodString>;
|
|
257
|
+
x5t: z.ZodOptional<z.ZodString>;
|
|
258
|
+
"x5t#S256": z.ZodOptional<z.ZodString>;
|
|
259
|
+
x5c: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
260
|
+
}, z.core.$strip>>;
|
|
261
|
+
}, z.core.$strip>>;
|
|
262
|
+
jwks_uri: z.ZodOptional<z.ZodString>;
|
|
263
|
+
audience: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
264
|
+
algorithms: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
265
|
+
RS256: "RS256";
|
|
266
|
+
RS384: "RS384";
|
|
267
|
+
RS512: "RS512";
|
|
268
|
+
ES256: "ES256";
|
|
269
|
+
ES384: "ES384";
|
|
270
|
+
ES512: "ES512";
|
|
271
|
+
}>>>;
|
|
272
|
+
max_lifetime_seconds: z.ZodDefault<z.ZodNumber>;
|
|
273
|
+
require_jti: z.ZodDefault<z.ZodBoolean>;
|
|
274
|
+
user_mapping: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
275
|
+
type: z.ZodLiteral<"connection">;
|
|
276
|
+
connection: z.ZodString;
|
|
277
|
+
create_if_not_exists: z.ZodDefault<z.ZodBoolean>;
|
|
278
|
+
trust_email_verified: z.ZodDefault<z.ZodBoolean>;
|
|
279
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
280
|
+
type: z.ZodLiteral<"user_id">;
|
|
281
|
+
}, z.core.$strip>], "type">;
|
|
282
|
+
}, z.core.$strip>>;
|
|
283
|
+
}, z.core.$strip>;
|
|
284
|
+
export type TokenExchangeProfileUpdate = z.input<typeof tokenExchangeProfileUpdateSchema>;
|
|
@@ -16,6 +16,12 @@
|
|
|
16
16
|
* this const keeps them byte-identical by construction.
|
|
17
17
|
*/
|
|
18
18
|
export declare const TRIGGER_API_SHAPES: Readonly<Record<string, Readonly<Record<string, readonly string[]>>>>;
|
|
19
|
+
/**
|
|
20
|
+
* The export each trigger's user code must define, e.g.
|
|
21
|
+
* `exports.onExecutePostLogin = async (event, api) => { ... }`. Shared by both
|
|
22
|
+
* executors for the same reason as {@link TRIGGER_API_SHAPES}.
|
|
23
|
+
*/
|
|
24
|
+
export declare const TRIGGER_FUNCTION_NAMES: Readonly<Record<string, string>>;
|
|
19
25
|
/**
|
|
20
26
|
* A single candidate primary the built-in email-based linking policy would
|
|
21
27
|
* consider, pre-resolved into a `post-user-login` code-hook event as
|
|
@@ -38,6 +38,7 @@ export * from "./User";
|
|
|
38
38
|
export * from "./Theme";
|
|
39
39
|
export * from "./PromptSetting";
|
|
40
40
|
export * from "./ProxyRoute";
|
|
41
|
+
export * from "./TokenExchangeProfile";
|
|
41
42
|
export * from "./ScimConfiguration";
|
|
42
43
|
export * from "./ScimToken";
|
|
43
44
|
export * from "./ScimExternalId";
|