authhero 0.25.0 → 0.25.2

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.
@@ -1193,20 +1193,7 @@ declare const ClientSchema: z.ZodObject<{
1193
1193
  }, {
1194
1194
  id: z.ZodOptional<z.ZodString>;
1195
1195
  name: z.ZodString;
1196
- strategy: z.ZodEnum<[
1197
- "google-oauth2",
1198
- "facebook",
1199
- "vipps",
1200
- "freja",
1201
- "apple",
1202
- "email",
1203
- "auth0",
1204
- "authhero",
1205
- "Username-Password-Authentication",
1206
- "oidc",
1207
- "oauth2",
1208
- "custom"
1209
- ]>;
1196
+ strategy: z.ZodString;
1210
1197
  options: z.ZodOptional<z.ZodDefault<z.ZodObject<{
1211
1198
  kid: z.ZodOptional<z.ZodString>;
1212
1199
  team_id: z.ZodOptional<z.ZodString>;
@@ -1257,7 +1244,7 @@ declare const ClientSchema: z.ZodObject<{
1257
1244
  created_at: string;
1258
1245
  updated_at: string;
1259
1246
  name: string;
1260
- strategy: "email" | "custom" | "google-oauth2" | "facebook" | "vipps" | "freja" | "apple" | "auth0" | "authhero" | "Username-Password-Authentication" | "oidc" | "oauth2";
1247
+ strategy: string;
1261
1248
  options?: {
1262
1249
  issuer?: string | undefined;
1263
1250
  client_secret?: string | undefined;
@@ -1281,7 +1268,7 @@ declare const ClientSchema: z.ZodObject<{
1281
1268
  created_at: string;
1282
1269
  updated_at: string;
1283
1270
  name: string;
1284
- strategy: "email" | "custom" | "google-oauth2" | "facebook" | "vipps" | "freja" | "apple" | "auth0" | "authhero" | "Username-Password-Authentication" | "oidc" | "oauth2";
1271
+ strategy: string;
1285
1272
  options?: {
1286
1273
  issuer?: string | undefined;
1287
1274
  client_secret?: string | undefined;
@@ -1441,7 +1428,7 @@ declare const ClientSchema: z.ZodObject<{
1441
1428
  created_at: string;
1442
1429
  updated_at: string;
1443
1430
  name: string;
1444
- strategy: "email" | "custom" | "google-oauth2" | "facebook" | "vipps" | "freja" | "apple" | "auth0" | "authhero" | "Username-Password-Authentication" | "oidc" | "oauth2";
1431
+ strategy: string;
1445
1432
  options?: {
1446
1433
  issuer?: string | undefined;
1447
1434
  client_secret?: string | undefined;
@@ -1519,7 +1506,7 @@ declare const ClientSchema: z.ZodObject<{
1519
1506
  created_at: string;
1520
1507
  updated_at: string;
1521
1508
  name: string;
1522
- strategy: "email" | "custom" | "google-oauth2" | "facebook" | "vipps" | "freja" | "apple" | "auth0" | "authhero" | "Username-Password-Authentication" | "oidc" | "oauth2";
1509
+ strategy: string;
1523
1510
  options?: {
1524
1511
  issuer?: string | undefined;
1525
1512
  client_secret?: string | undefined;
@@ -1657,20 +1644,7 @@ export type Code = z.infer<typeof codeSchema>;
1657
1644
  export declare const connectionInsertSchema: z.ZodObject<{
1658
1645
  id: z.ZodOptional<z.ZodString>;
1659
1646
  name: z.ZodString;
1660
- strategy: z.ZodEnum<[
1661
- "google-oauth2",
1662
- "facebook",
1663
- "vipps",
1664
- "freja",
1665
- "apple",
1666
- "email",
1667
- "auth0",
1668
- "authhero",
1669
- "Username-Password-Authentication",
1670
- "oidc",
1671
- "oauth2",
1672
- "custom"
1673
- ]>;
1647
+ strategy: z.ZodString;
1674
1648
  options: z.ZodOptional<z.ZodDefault<z.ZodObject<{
1675
1649
  kid: z.ZodOptional<z.ZodString>;
1676
1650
  team_id: z.ZodOptional<z.ZodString>;
@@ -1719,7 +1693,7 @@ export declare const connectionInsertSchema: z.ZodObject<{
1719
1693
  response_mode: z.ZodOptional<z.ZodType<AuthorizationResponseMode, z.ZodTypeDef, AuthorizationResponseMode>>;
1720
1694
  }, "strip", z.ZodTypeAny, {
1721
1695
  name: string;
1722
- strategy: "email" | "custom" | "google-oauth2" | "facebook" | "vipps" | "freja" | "apple" | "auth0" | "authhero" | "Username-Password-Authentication" | "oidc" | "oauth2";
1696
+ strategy: string;
1723
1697
  options?: {
1724
1698
  issuer?: string | undefined;
1725
1699
  client_secret?: string | undefined;
@@ -1741,7 +1715,7 @@ export declare const connectionInsertSchema: z.ZodObject<{
1741
1715
  enabled_clients?: string[] | undefined;
1742
1716
  }, {
1743
1717
  name: string;
1744
- strategy: "email" | "custom" | "google-oauth2" | "facebook" | "vipps" | "freja" | "apple" | "auth0" | "authhero" | "Username-Password-Authentication" | "oidc" | "oauth2";
1718
+ strategy: string;
1745
1719
  options?: {
1746
1720
  issuer?: string | undefined;
1747
1721
  client_secret?: string | undefined;
@@ -1770,20 +1744,7 @@ export declare const connectionSchema: z.ZodObject<z.objectUtil.extendShape<{
1770
1744
  }, {
1771
1745
  id: z.ZodOptional<z.ZodString>;
1772
1746
  name: z.ZodString;
1773
- strategy: z.ZodEnum<[
1774
- "google-oauth2",
1775
- "facebook",
1776
- "vipps",
1777
- "freja",
1778
- "apple",
1779
- "email",
1780
- "auth0",
1781
- "authhero",
1782
- "Username-Password-Authentication",
1783
- "oidc",
1784
- "oauth2",
1785
- "custom"
1786
- ]>;
1747
+ strategy: z.ZodString;
1787
1748
  options: z.ZodOptional<z.ZodDefault<z.ZodObject<{
1788
1749
  kid: z.ZodOptional<z.ZodString>;
1789
1750
  team_id: z.ZodOptional<z.ZodString>;
@@ -1834,7 +1795,7 @@ export declare const connectionSchema: z.ZodObject<z.objectUtil.extendShape<{
1834
1795
  created_at: string;
1835
1796
  updated_at: string;
1836
1797
  name: string;
1837
- strategy: "email" | "custom" | "google-oauth2" | "facebook" | "vipps" | "freja" | "apple" | "auth0" | "authhero" | "Username-Password-Authentication" | "oidc" | "oauth2";
1798
+ strategy: string;
1838
1799
  options?: {
1839
1800
  issuer?: string | undefined;
1840
1801
  client_secret?: string | undefined;
@@ -1858,7 +1819,7 @@ export declare const connectionSchema: z.ZodObject<z.objectUtil.extendShape<{
1858
1819
  created_at: string;
1859
1820
  updated_at: string;
1860
1821
  name: string;
1861
- strategy: "email" | "custom" | "google-oauth2" | "facebook" | "vipps" | "freja" | "apple" | "auth0" | "authhero" | "Username-Password-Authentication" | "oidc" | "oauth2";
1822
+ strategy: string;
1862
1823
  options?: {
1863
1824
  issuer?: string | undefined;
1864
1825
  client_secret?: string | undefined;
@@ -4426,6 +4387,22 @@ export interface DataAdapters {
4426
4387
  themes: ThemesAdapter;
4427
4388
  users: UserDataAdapter;
4428
4389
  }
4390
+ export type OnExecuteCredentialsExchangeEvent = {
4391
+ client: Client;
4392
+ user?: User;
4393
+ scope: string;
4394
+ grant_type: string;
4395
+ audience?: string;
4396
+ };
4397
+ export type OnExecuteCredentialsExchangeAPI = {
4398
+ accessToken: {
4399
+ setCustomClaim: (claim: string, value: any) => void;
4400
+ };
4401
+ access: {
4402
+ deny: (code: string, reason?: string) => void;
4403
+ };
4404
+ };
4405
+ export type OnExecuteCredentialsExchange = (event: OnExecuteCredentialsExchangeEvent, access: OnExecuteCredentialsExchangeAPI) => Promise<void>;
4429
4406
  export declare type Fetcher = {
4430
4407
  fetch: typeof fetch;
4431
4408
  };
@@ -4436,6 +4413,9 @@ export type Bindings = {
4436
4413
  JWKS_SERVICE: Fetcher;
4437
4414
  ISSUER: string;
4438
4415
  data: DataAdapters;
4416
+ hooks: {
4417
+ onExecuteCredentialsExchange?: OnExecuteCredentialsExchange;
4418
+ };
4439
4419
  JWKS_CACHE_TIMEOUT_IN_SECONDS: number;
4440
4420
  ORGANIZATION_NAME: string;
4441
4421
  };
@@ -4512,7 +4492,7 @@ export declare function init(config: AuthHeroConfig): {
4512
4492
  created_at: string;
4513
4493
  updated_at: string;
4514
4494
  name: string;
4515
- strategy: "email" | "custom" | "google-oauth2" | "facebook" | "vipps" | "freja" | "apple" | "auth0" | "authhero" | "Username-Password-Authentication" | "oidc" | "oauth2";
4495
+ strategy: string;
4516
4496
  options?: {
4517
4497
  issuer?: string | undefined;
4518
4498
  client_secret?: string | undefined;
@@ -4540,7 +4520,7 @@ export declare function init(config: AuthHeroConfig): {
4540
4520
  created_at: string;
4541
4521
  updated_at: string;
4542
4522
  name: string;
4543
- strategy: "email" | "custom" | "google-oauth2" | "facebook" | "vipps" | "freja" | "apple" | "auth0" | "authhero" | "Username-Password-Authentication" | "oidc" | "oauth2";
4523
+ strategy: string;
4544
4524
  options?: {
4545
4525
  issuer?: string | undefined;
4546
4526
  client_secret?: string | undefined;
@@ -4582,7 +4562,7 @@ export declare function init(config: AuthHeroConfig): {
4582
4562
  created_at: string;
4583
4563
  updated_at: string;
4584
4564
  name: string;
4585
- strategy: "email" | "custom" | "google-oauth2" | "facebook" | "vipps" | "freja" | "apple" | "auth0" | "authhero" | "Username-Password-Authentication" | "oidc" | "oauth2";
4565
+ strategy: string;
4586
4566
  options?: {
4587
4567
  issuer?: string | undefined;
4588
4568
  client_secret?: string | undefined;
@@ -4654,7 +4634,7 @@ export declare function init(config: AuthHeroConfig): {
4654
4634
  } | undefined;
4655
4635
  name?: string | undefined;
4656
4636
  id?: string | undefined;
4657
- strategy?: "email" | "custom" | "Username-Password-Authentication" | "google-oauth2" | "facebook" | "vipps" | "freja" | "apple" | "auth0" | "authhero" | "oidc" | "oauth2" | undefined;
4637
+ strategy?: string | undefined;
4658
4638
  response_type?: AuthorizationResponseType | undefined;
4659
4639
  response_mode?: AuthorizationResponseMode | undefined;
4660
4640
  enabled_clients?: string[] | undefined;
@@ -4664,7 +4644,7 @@ export declare function init(config: AuthHeroConfig): {
4664
4644
  created_at: string;
4665
4645
  updated_at: string;
4666
4646
  name: string;
4667
- strategy: "email" | "custom" | "google-oauth2" | "facebook" | "vipps" | "freja" | "apple" | "auth0" | "authhero" | "Username-Password-Authentication" | "oidc" | "oauth2";
4647
+ strategy: string;
4668
4648
  options?: {
4669
4649
  issuer?: string | undefined;
4670
4650
  client_secret?: string | undefined;
@@ -4699,7 +4679,7 @@ export declare function init(config: AuthHeroConfig): {
4699
4679
  } & {
4700
4680
  json: {
4701
4681
  name: string;
4702
- strategy: "email" | "custom" | "Username-Password-Authentication" | "google-oauth2" | "facebook" | "vipps" | "freja" | "apple" | "auth0" | "authhero" | "oidc" | "oauth2";
4682
+ strategy: string;
4703
4683
  options?: {
4704
4684
  issuer?: string | undefined;
4705
4685
  client_secret?: string | undefined;
@@ -4725,7 +4705,7 @@ export declare function init(config: AuthHeroConfig): {
4725
4705
  created_at: string;
4726
4706
  updated_at: string;
4727
4707
  name: string;
4728
- strategy: "email" | "custom" | "google-oauth2" | "facebook" | "vipps" | "freja" | "apple" | "auth0" | "authhero" | "Username-Password-Authentication" | "oidc" | "oauth2";
4708
+ strategy: string;
4729
4709
  options?: {
4730
4710
  issuer?: string | undefined;
4731
4711
  client_secret?: string | undefined;