@absolutejs/auth 0.65.5 → 0.66.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.
Files changed (61) hide show
  1. package/dist/agents/context.d.ts +5 -18
  2. package/dist/agents/index.js +3 -3
  3. package/dist/agents/index.js.map +3 -3
  4. package/dist/agents/routes.d.ts +24 -56
  5. package/dist/apikeys/routes.d.ts +169 -78
  6. package/dist/authContext.d.ts +34 -79
  7. package/dist/authorization/protectPermission.d.ts +11 -23
  8. package/dist/cli/migrate.js +2 -2
  9. package/dist/cli/migrate.js.map +4 -4
  10. package/dist/compliance/routes.d.ts +179 -54
  11. package/dist/credentials/emailVerification.d.ts +173 -56
  12. package/dist/credentials/login.d.ts +192 -63
  13. package/dist/credentials/passwordReset.d.ts +171 -60
  14. package/dist/credentials/register.d.ts +182 -41
  15. package/dist/credentials/routes.d.ts +46 -36
  16. package/dist/htmx/configuredRoutes.d.ts +263 -114
  17. package/dist/htmx/routes.d.ts +261 -89
  18. package/dist/index.d.ts +663 -443
  19. package/dist/index.js +475 -448
  20. package/dist/index.js.map +48 -48
  21. package/dist/manifest.js +86 -4
  22. package/dist/manifest.js.map +3 -3
  23. package/dist/mfa/challenge.d.ts +189 -59
  24. package/dist/mfa/management.d.ts +179 -54
  25. package/dist/mfa/routes.d.ts +34 -40
  26. package/dist/mfa/sms.d.ts +187 -59
  27. package/dist/mfa/totp.d.ts +187 -57
  28. package/dist/oidc/routes.d.ts +73 -74
  29. package/dist/oidc/vciRoutes.d.ts +9 -45
  30. package/dist/organizations/routes.d.ts +215 -77
  31. package/dist/passwordless/routes.d.ts +22 -34
  32. package/dist/portal/routes.d.ts +162 -55
  33. package/dist/roles/routes.d.ts +198 -67
  34. package/dist/routes/authorize.d.ts +182 -90
  35. package/dist/routes/callback.d.ts +189 -38
  36. package/dist/routes/profile.d.ts +177 -51
  37. package/dist/routes/protectRoute.d.ts +11 -23
  38. package/dist/routes/refresh.d.ts +177 -51
  39. package/dist/routes/requireAuth.d.ts +9 -21
  40. package/dist/routes/revoke.d.ts +177 -51
  41. package/dist/routes/sessions.d.ts +187 -61
  42. package/dist/routes/signout.d.ts +174 -50
  43. package/dist/routes/stepUp.d.ts +11 -23
  44. package/dist/routes/userStatus.d.ts +174 -52
  45. package/dist/scim/routes.d.ts +208 -73
  46. package/dist/server.js +475 -448
  47. package/dist/server.js.map +48 -48
  48. package/dist/session/cleanup.d.ts +5 -18
  49. package/dist/session/state.d.ts +3 -23
  50. package/dist/sso/discoveryRoute.d.ts +158 -52
  51. package/dist/sso/oidcRoutes.d.ts +211 -59
  52. package/dist/sso/samlIdpRoutes.d.ts +175 -46
  53. package/dist/sso/samlRoutes.d.ts +217 -69
  54. package/dist/typebox.d.ts +4 -4
  55. package/dist/types.d.ts +3 -5
  56. package/dist/vault/index.js +3 -3
  57. package/dist/vault/index.js.map +3 -3
  58. package/dist/vc/statusListRoutes.d.ts +158 -52
  59. package/dist/vc/vpRoutes.d.ts +170 -66
  60. package/dist/webauthn/routes.d.ts +199 -66
  61. package/package.json +8 -120
package/dist/types.d.ts CHANGED
@@ -1,7 +1,5 @@
1
1
  import { CredentialsFor, CustomProviderCredentials, NonEmptyArray, OAuth2Client, OAuth2TokenResponse, ProviderConfig, ProviderOption, ProvidersMap } from 'citra';
2
- import { Cookie, status as statusType, redirect as redirectType } from 'elysia';
3
- import { ElysiaCustomStatusResponse } from 'elysia/error';
4
- import type { StatusMap } from 'elysia/utils';
2
+ import { Cookie, type ElysiaStatus, type StatusMap, status as statusType, redirect as redirectType } from 'elysia';
5
3
  import type { ApiKeysConfig } from './apikeys/config';
6
4
  import type { AgentAuthConfig } from './agents/config';
7
5
  import type { AuditConfig } from './audit/config';
@@ -129,7 +127,7 @@ export type ResolvedOAuthAuthorization = {
129
127
  expiresAt?: number;
130
128
  tokenType?: string;
131
129
  };
132
- export type StatusReturn = Pick<ElysiaCustomStatusResponse<number | keyof StatusMap, unknown>, 'code' | 'response'>;
130
+ export type StatusReturn = Pick<ElysiaStatus<number | keyof StatusMap, unknown>, 'code' | 'response'>;
133
131
  export type OnNewUser<UserType> = (userIdentity: JsonObject) => UserType | StatusReturn | Response | Promise<UserType | StatusReturn | Response>;
134
132
  export type GetUser<UserType> = (userIdentity: JsonObject) => UserType | StatusReturn | Response | null | undefined | Promise<UserType | StatusReturn | Response | null | undefined>;
135
133
  export type CallbackCookie = Record<string, Cookie<unknown>> & {
@@ -434,5 +432,5 @@ export type JsonValue = JsonPrimitive | JsonObject | JsonValue[];
434
432
  export type JsonObject = {
435
433
  [key: string]: JsonValue;
436
434
  };
437
- export declare function isJsonValue(value: unknown): value is JsonValue;
435
+ export declare const isJsonValue: (value: unknown) => value is JsonValue;
438
436
  export declare const parseJsonObject: (value: unknown) => JsonObject;
@@ -77,8 +77,8 @@ var DEFAULT_TOKEN_BYTES = 32, AES_KEY_BYTES = 32, AES_IV_BYTES = 12, HOTP_COUNTE
77
77
  const digest = await crypto.subtle.digest("SHA-256", textEncoder.encode(input));
78
78
  return new Uint8Array(digest);
79
79
  }, hmacSha1 = async (key, message) => {
80
- const cryptoKey = await crypto.subtle.importKey("raw", key, { hash: "SHA-1", name: "HMAC" }, false, ["sign"]);
81
- const signature = await crypto.subtle.sign("HMAC", cryptoKey, message);
80
+ const cryptoKey = await crypto.subtle.importKey("raw", Uint8Array.from(key), { hash: "SHA-1", name: "HMAC" }, false, ["sign"]);
81
+ const signature = await crypto.subtle.sign("HMAC", cryptoKey, Uint8Array.from(message));
82
82
  return new Uint8Array(signature);
83
83
  }, counterToBytes = (counter) => {
84
84
  const bytes = new Uint8Array(HOTP_COUNTER_BYTES);
@@ -11897,5 +11897,5 @@ export {
11897
11897
  createInMemoryVaultStore
11898
11898
  };
11899
11899
 
11900
- //# debugId=52ACBAC2C365275864756E2164756E21
11900
+ //# debugId=A59F5C5C4E886DF264756E2164756E21
11901
11901
  //# sourceMappingURL=index.js.map