@absolutejs/auth 0.73.1 → 0.74.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 (48) hide show
  1. package/README.md +24 -0
  2. package/dist/apikeys/routes.d.ts +1 -1
  3. package/dist/authContext.d.ts +5 -5
  4. package/dist/authorization/protectPermission.d.ts +2 -2
  5. package/dist/client/index.js +7 -1
  6. package/dist/client/index.js.map +3 -3
  7. package/dist/client/mobile.d.ts +2 -0
  8. package/dist/client/mobile.js +7 -1
  9. package/dist/client/mobile.js.map +3 -3
  10. package/dist/compliance/routes.d.ts +1 -1
  11. package/dist/credentials/emailVerification.d.ts +1 -1
  12. package/dist/credentials/login.d.ts +1 -1
  13. package/dist/credentials/passwordReset.d.ts +1 -1
  14. package/dist/credentials/register.d.ts +1 -1
  15. package/dist/htmx/configuredRoutes.d.ts +5 -5
  16. package/dist/htmx/routes.d.ts +5 -5
  17. package/dist/index.d.ts +13 -12
  18. package/dist/index.js +1466 -1360
  19. package/dist/index.js.map +6 -5
  20. package/dist/mfa/challenge.d.ts +1 -1
  21. package/dist/mfa/management.d.ts +1 -1
  22. package/dist/mfa/sms.d.ts +1 -1
  23. package/dist/mfa/totp.d.ts +1 -1
  24. package/dist/nativePush.d.ts +288 -0
  25. package/dist/organizations/routes.d.ts +1 -1
  26. package/dist/portal/routes.d.ts +1 -1
  27. package/dist/roles/routes.d.ts +1 -1
  28. package/dist/routes/authorize.d.ts +1 -1
  29. package/dist/routes/callback.d.ts +1 -1
  30. package/dist/routes/profile.d.ts +1 -1
  31. package/dist/routes/protectRoute.d.ts +2 -2
  32. package/dist/routes/refresh.d.ts +1 -1
  33. package/dist/routes/revoke.d.ts +1 -1
  34. package/dist/routes/sessions.d.ts +1 -1
  35. package/dist/routes/signout.d.ts +1 -1
  36. package/dist/routes/userStatus.d.ts +1 -1
  37. package/dist/scim/routes.d.ts +1 -1
  38. package/dist/server.js +1464 -1360
  39. package/dist/server.js.map +6 -5
  40. package/dist/sso/discoveryRoute.d.ts +1 -1
  41. package/dist/sso/oidcRoutes.d.ts +1 -1
  42. package/dist/sso/samlIdpRoutes.d.ts +1 -1
  43. package/dist/sso/samlRoutes.d.ts +1 -1
  44. package/dist/types.d.ts +2 -0
  45. package/dist/vc/statusListRoutes.d.ts +1 -1
  46. package/dist/vc/vpRoutes.d.ts +1 -1
  47. package/dist/webauthn/routes.d.ts +1 -1
  48. package/package.json +1 -1
@@ -28,7 +28,7 @@ export declare const ssoDiscoveryRoute: ({ getOrganizationByEmailDomain, ssoConn
28
28
  status?: number | keyof import("elysia").StatusMap;
29
29
  cookie?: Record<string, import("elysia").BaseCookie>;
30
30
  };
31
- status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 501 | 204 | 404 | 200 | 100 | 101 | 102 | 103 | 201 | 202 | 203 | 205 | 206 | 207 | 208 | 300 | 301 | 302 | 303 | 304 | 307 | 308 | 402 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451 | 500 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
31
+ status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 501 | 204 | 404 | 200 | 301 | 302 | 303 | 307 | 308 | 100 | 101 | 102 | 103 | 201 | 202 | 203 | 205 | 206 | 207 | 208 | 300 | 304 | 402 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451 | 500 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
32
32
  readonly 100: "Continue";
33
33
  readonly 101: "Switching Protocols";
34
34
  readonly 102: "Processing";
@@ -87,7 +87,7 @@ export declare const oidcSsoRoutes: <UserType>({ authSessionStore, cookieSecure,
87
87
  status?: number | keyof import("elysia").StatusMap;
88
88
  cookie?: Record<string, import("elysia").BaseCookie>;
89
89
  };
90
- status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 501 | 204 | 404 | 200 | 100 | 101 | 102 | 103 | 201 | 202 | 203 | 205 | 206 | 207 | 208 | 300 | 301 | 302 | 303 | 304 | 307 | 308 | 402 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451 | 500 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
90
+ status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 501 | 204 | 404 | 200 | 301 | 302 | 303 | 307 | 308 | 100 | 101 | 102 | 103 | 201 | 202 | 203 | 205 | 206 | 207 | 208 | 300 | 304 | 402 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451 | 500 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
91
91
  readonly 100: "Continue";
92
92
  readonly 101: "Switching Protocols";
93
93
  readonly 102: "Processing";
@@ -121,7 +121,7 @@ export declare const samlIdpRoutes: <UserType>({ authSessionStore, getNameId, ge
121
121
  status?: number | keyof import("elysia").StatusMap;
122
122
  cookie?: Record<string, import("elysia").BaseCookie>;
123
123
  };
124
- status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 501 | 204 | 404 | 200 | 100 | 101 | 102 | 103 | 201 | 202 | 203 | 205 | 206 | 207 | 208 | 300 | 301 | 302 | 303 | 304 | 307 | 308 | 402 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451 | 500 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
124
+ status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 501 | 204 | 404 | 200 | 301 | 302 | 303 | 307 | 308 | 100 | 101 | 102 | 103 | 201 | 202 | 203 | 205 | 206 | 207 | 208 | 300 | 304 | 402 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451 | 500 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
125
125
  readonly 100: "Continue";
126
126
  readonly 101: "Switching Protocols";
127
127
  readonly 102: "Processing";
@@ -166,7 +166,7 @@ export declare const samlSsoRoutes: <UserType>({ authSessionStore, cookieSecure,
166
166
  status?: number | keyof import("elysia").StatusMap;
167
167
  cookie?: Record<string, import("elysia").BaseCookie>;
168
168
  };
169
- status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 501 | 204 | 404 | 200 | 100 | 101 | 102 | 103 | 201 | 202 | 203 | 205 | 206 | 207 | 208 | 300 | 301 | 302 | 303 | 304 | 307 | 308 | 402 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451 | 500 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
169
+ status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 501 | 204 | 404 | 200 | 301 | 302 | 303 | 307 | 308 | 100 | 101 | 102 | 103 | 201 | 202 | 203 | 205 | 206 | 207 | 208 | 300 | 304 | 402 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451 | 500 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
170
170
  readonly 100: "Continue";
171
171
  readonly 101: "Switching Protocols";
172
172
  readonly 102: "Processing";
package/dist/types.d.ts CHANGED
@@ -247,6 +247,8 @@ export type AuthConfig<UserType> = {
247
247
  * the resolver the package uses to hydrate the typed `user` in
248
248
  * `protectRoute`'s context. */
249
249
  getUser: (sub: string) => UserType | null | Promise<UserType | null>;
250
+ /** Authenticated, server-owned native push registration. Requires `oidc`. */
251
+ nativePush?: import('./nativePush').NativePushConfig<NoInfer<UserType>>;
250
252
  providersConfiguration: OAuth2ConfigurationOptions;
251
253
  /** Bring-your-own OAuth providers (citra createCustomOAuth2Client) — keys
252
254
  * must not collide with built-in provider names. */
@@ -29,7 +29,7 @@ export declare const statusListRoutes: ({ getStatusList, issuerUrl, signingKey,
29
29
  status?: number | keyof import("elysia").StatusMap;
30
30
  cookie?: Record<string, import("elysia").BaseCookie>;
31
31
  };
32
- status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 501 | 204 | 404 | 200 | 100 | 101 | 102 | 103 | 201 | 202 | 203 | 205 | 206 | 207 | 208 | 300 | 301 | 302 | 303 | 304 | 307 | 308 | 402 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451 | 500 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
32
+ status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 501 | 204 | 404 | 200 | 301 | 302 | 303 | 307 | 308 | 100 | 101 | 102 | 103 | 201 | 202 | 203 | 205 | 206 | 207 | 208 | 300 | 304 | 402 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451 | 500 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
33
33
  readonly 100: "Continue";
34
34
  readonly 101: "Switching Protocols";
35
35
  readonly 102: "Processing";
@@ -82,7 +82,7 @@ export declare const vpRoutes: ({ defaultClientId, issuerUrl, onVerifiedPresenta
82
82
  status?: number | keyof import("elysia").StatusMap;
83
83
  cookie?: Record<string, import("elysia").BaseCookie>;
84
84
  };
85
- status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 501 | 204 | 404 | 200 | 100 | 101 | 102 | 103 | 201 | 202 | 203 | 205 | 206 | 207 | 208 | 300 | 301 | 302 | 303 | 304 | 307 | 308 | 402 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451 | 500 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
85
+ status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 501 | 204 | 404 | 200 | 301 | 302 | 303 | 307 | 308 | 100 | 101 | 102 | 103 | 201 | 202 | 203 | 205 | 206 | 207 | 208 | 300 | 304 | 402 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451 | 500 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
86
86
  readonly 100: "Continue";
87
87
  readonly 101: "Switching Protocols";
88
88
  readonly 102: "Processing";
@@ -132,7 +132,7 @@ export declare const webauthnRoutes: <UserType>({ authSessionStore, challengeDur
132
132
  status?: number | keyof import("elysia").StatusMap;
133
133
  cookie?: Record<string, import("elysia").BaseCookie>;
134
134
  };
135
- status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 501 | 204 | 404 | 200 | 100 | 101 | 102 | 103 | 201 | 202 | 203 | 205 | 206 | 207 | 208 | 300 | 301 | 302 | 303 | 304 | 307 | 308 | 402 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451 | 500 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
135
+ status: <const Code extends number | keyof import("elysia").StatusMap, const T = Code extends 400 | 401 | 403 | 501 | 204 | 404 | 200 | 301 | 302 | 303 | 307 | 308 | 100 | 101 | 102 | 103 | 201 | 202 | 203 | 205 | 206 | 207 | 208 | 300 | 304 | 402 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 428 | 429 | 431 | 451 | 500 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 ? {
136
136
  readonly 100: "Continue";
137
137
  readonly 101: "Switching Protocols";
138
138
  readonly 102: "Processing";
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.73.1",
2
+ "version": "0.74.0",
3
3
  "name": "@absolutejs/auth",
4
4
  "description": "An authorization library for absolutejs",
5
5
  "repository": {