@authhero/drizzle 1.7.4 → 1.8.1

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.
@@ -64,6 +64,13 @@
64
64
  "when": 1788700194751,
65
65
  "tag": "0008_client_grants_unique_audience",
66
66
  "breakpoints": true
67
+ },
68
+ {
69
+ "idx": 9,
70
+ "version": "6",
71
+ "when": 1790333364216,
72
+ "tag": "0009_token_exchange_profiles",
73
+ "breakpoints": true
67
74
  }
68
75
  ]
69
76
  }
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "type": "git",
12
12
  "url": "https://github.com/markusahlstrand/authhero"
13
13
  },
14
- "version": "1.7.4",
14
+ "version": "1.8.1",
15
15
  "files": [
16
16
  "dist",
17
17
  "src/schema",
@@ -35,8 +35,8 @@
35
35
  "dependencies": {
36
36
  "drizzle-orm": "^0.45.2",
37
37
  "nanoid": "^5.1.11",
38
- "@authhero/adapter-interfaces": "4.14.0",
39
- "@authhero/proxy": "0.11.0"
38
+ "@authhero/adapter-interfaces": "4.16.0",
39
+ "@authhero/proxy": "0.11.2"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@hono/zod-openapi": "^1.4.0",
@@ -87,6 +87,7 @@ export const clients = sqliteTable(
87
87
  registration_type: text("registration_type", { length: 32 }),
88
88
  registration_metadata: text("registration_metadata"),
89
89
  user_linking_mode: text("user_linking_mode", { length: 16 }),
90
+ token_exchange: text("token_exchange"),
90
91
  },
91
92
  (table) => [
92
93
  primaryKey({
@@ -49,3 +49,6 @@ export * from "./proxyRoutes";
49
49
 
50
50
  // SCIM inbound provisioning (#1191)
51
51
  export * from "./scim";
52
+
53
+ // Custom Token Exchange profiles (#1417)
54
+ export * from "./tokenExchangeProfiles";
@@ -0,0 +1,25 @@
1
+ import { sqliteTable, text, uniqueIndex } from "drizzle-orm/sqlite-core";
2
+
3
+ // Custom Token Exchange profiles (#1417). The unique (tenant_id,
4
+ // subject_token_type) index makes a subject_token_type resolve to a single
5
+ // profile; a duplicate create surfaces as a constraint error (409 upstream).
6
+ export const tokenExchangeProfiles = sqliteTable(
7
+ "token_exchange_profiles",
8
+ {
9
+ id: text("id", { length: 64 }).primaryKey(),
10
+ tenant_id: text("tenant_id", { length: 255 }).notNull(),
11
+ name: text("name", { length: 255 }).notNull(),
12
+ subject_token_type: text("subject_token_type", { length: 255 }).notNull(),
13
+ action_id: text("action_id", { length: 255 }),
14
+ type: text("type", { length: 64 }).notNull(),
15
+ jwt_verification: text("jwt_verification"),
16
+ created_at: text("created_at", { length: 35 }).notNull(),
17
+ updated_at: text("updated_at", { length: 35 }).notNull(),
18
+ },
19
+ (table) => [
20
+ uniqueIndex("token_exchange_profiles_tenant_subject_token_type_idx").on(
21
+ table.tenant_id,
22
+ table.subject_token_type,
23
+ ),
24
+ ],
25
+ );