@absolutejs/auth 0.56.1 → 0.56.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.
@@ -2617,6 +2617,16 @@ import {
2617
2617
  } from "drizzle-orm/pg-core";
2618
2618
  var URL_LENGTH = 2048;
2619
2619
  var ID_LENGTH8 = 255;
2620
+ var BACKCHANNEL_AUTH_STATUSES = new Set([
2621
+ "approved",
2622
+ "denied",
2623
+ "pending"
2624
+ ]);
2625
+ var DEVICE_AUTHORIZATION_STATUSES = new Set([
2626
+ "approved",
2627
+ "denied",
2628
+ "pending"
2629
+ ]);
2620
2630
  var oauthBackchannelAuthRequestsTable = pgTable10("auth_oauth_backchannel_auth_requests", {
2621
2631
  auth_req_id: varchar10("auth_req_id", { length: ID_LENGTH8 }).primaryKey(),
2622
2632
  binding_message: text5("binding_message"),
@@ -2661,6 +2671,7 @@ var oauthClientsTable = pgTable10("auth_oauth_clients", {
2661
2671
  });
2662
2672
  var oauthCodesTable = pgTable10("auth_oauth_codes", {
2663
2673
  acr: varchar10("acr", { length: ID_LENGTH8 }),
2674
+ audience: varchar10("audience", { length: URL_LENGTH }),
2664
2675
  claims_json: jsonb5("claims_json").$type(),
2665
2676
  client_id: varchar10("client_id", { length: ID_LENGTH8 }).notNull(),
2666
2677
  code_challenge: varchar10("code_challenge", { length: ID_LENGTH8 }).notNull(),
@@ -2713,6 +2724,7 @@ var oauthPushedAuthorizationRequestsTable = pgTable10("auth_oauth_pushed_authori
2713
2724
  });
2714
2725
  var oauthRefreshTokensTable = pgTable10("auth_oauth_refresh_tokens", {
2715
2726
  acr: varchar10("acr", { length: ID_LENGTH8 }),
2727
+ audience: varchar10("audience", { length: URL_LENGTH }),
2716
2728
  claims_json: jsonb5("claims_json").$type(),
2717
2729
  client_id: varchar10("client_id", { length: ID_LENGTH8 }).notNull(),
2718
2730
  created_at_ms: bigint8("created_at_ms", { mode: "number" }).notNull(),
@@ -3118,6 +3130,14 @@ var mfaTotpLockoutMigration = {
3118
3130
  id: "0003_totp_lockout",
3119
3131
  sql: 'ALTER TABLE "auth_mfa_enrollments" ADD COLUMN IF NOT EXISTS "totp_failed_attempts" smallint NOT NULL DEFAULT 0;'
3120
3132
  };
3133
+ var oidcResourceAudienceMigration = {
3134
+ id: "0002_resource_audience",
3135
+ sql: [
3136
+ 'ALTER TABLE "auth_oauth_codes" ADD COLUMN IF NOT EXISTS "audience" varchar(2048);',
3137
+ 'ALTER TABLE "auth_oauth_refresh_tokens" ADD COLUMN IF NOT EXISTS "audience" varchar(2048);'
3138
+ ].join(`
3139
+ `)
3140
+ };
3121
3141
  var blockMigrations = {
3122
3142
  adaptive: initMigration("adaptive", [knownDevicesTable, loginHistoryTable]),
3123
3143
  agents: {
@@ -3159,18 +3179,24 @@ var blockMigrations = {
3159
3179
  mfaTotpLockoutMigration
3160
3180
  ]
3161
3181
  },
3162
- oidc: initMigration("oidc", [
3163
- oauthBackchannelAuthRequestsTable,
3164
- oauthClientAssertionJtisTable,
3165
- oauthClientRegistrationTokensTable,
3166
- oauthClientsTable,
3167
- oauthCodesTable,
3168
- oauthDeviceAuthorizationsTable,
3169
- oauthInitialAccessTokensTable,
3170
- oauthLogoutDeliveriesTable,
3171
- oauthPushedAuthorizationRequestsTable,
3172
- oauthRefreshTokensTable
3173
- ]),
3182
+ oidc: {
3183
+ block: "oidc",
3184
+ migrations: [
3185
+ ...initMigration("oidc", [
3186
+ oauthBackchannelAuthRequestsTable,
3187
+ oauthClientAssertionJtisTable,
3188
+ oauthClientRegistrationTokensTable,
3189
+ oauthClientsTable,
3190
+ oauthCodesTable,
3191
+ oauthDeviceAuthorizationsTable,
3192
+ oauthInitialAccessTokensTable,
3193
+ oauthLogoutDeliveriesTable,
3194
+ oauthPushedAuthorizationRequestsTable,
3195
+ oauthRefreshTokensTable
3196
+ ]).migrations,
3197
+ oidcResourceAudienceMigration
3198
+ ]
3199
+ },
3174
3200
  organizations: initMigration("organizations", [
3175
3201
  organizationsTable,
3176
3202
  organizationMembershipsTable,
@@ -3362,5 +3388,5 @@ var main = async () => {
3362
3388
  };
3363
3389
  await main();
3364
3390
 
3365
- //# debugId=2CDEAF9E7315372064756E2164756E21
3391
+ //# debugId=8A2517B7159F359864756E2164756E21
3366
3392
  //# sourceMappingURL=migrate.js.map