@owlmeans/auth 0.1.18-rc.39 → 0.1.18-rc.40

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 (87) hide show
  1. package/README.md +33 -32
  2. package/agent-meta/manifest.json +2 -2
  3. package/agent-meta/skills/auth/SKILL.md +17 -17
  4. package/agent-meta/skills/auth-protocol/SKILL.md +28 -25
  5. package/build/allowance/index.d.ts +1 -1
  6. package/build/allowance/index.d.ts.map +1 -1
  7. package/build/allowance/index.js +1 -1
  8. package/build/allowance/index.js.map +1 -1
  9. package/build/allowance/{model.d.ts → schemas.d.ts} +1 -1
  10. package/build/allowance/schemas.d.ts.map +1 -0
  11. package/build/allowance/{model.js → schemas.js} +3 -3
  12. package/build/allowance/schemas.js.map +1 -0
  13. package/build/auth/index.d.ts +1 -1
  14. package/build/auth/index.d.ts.map +1 -1
  15. package/build/auth/index.js +1 -1
  16. package/build/auth/index.js.map +1 -1
  17. package/build/auth/{model.d.ts → schemas.d.ts} +1 -1
  18. package/build/auth/schemas.d.ts.map +1 -0
  19. package/build/auth/{model.js → schemas.js} +2 -2
  20. package/build/auth/schemas.js.map +1 -0
  21. package/build/consts.d.ts +1 -0
  22. package/build/consts.d.ts.map +1 -1
  23. package/build/consts.js +1 -0
  24. package/build/consts.js.map +1 -1
  25. package/build/entity/index.d.ts +1 -1
  26. package/build/entity/index.js +1 -1
  27. package/build/entity/{profile.d.ts → schemas.d.ts} +1 -1
  28. package/build/entity/schemas.d.ts.map +1 -0
  29. package/build/entity/{profile.js → schemas.js} +2 -2
  30. package/build/entity/{profile.js.map → schemas.js.map} +1 -1
  31. package/build/helper/types.d.ts +22 -0
  32. package/build/helper/types.d.ts.map +1 -0
  33. package/build/helper/types.js +2 -0
  34. package/build/helper/types.js.map +1 -0
  35. package/build/helper.d.ts +7 -11
  36. package/build/helper.d.ts.map +1 -1
  37. package/build/helper.js +30 -27
  38. package/build/helper.js.map +1 -1
  39. package/build/index.d.ts +1 -1
  40. package/build/index.d.ts.map +1 -1
  41. package/build/index.js +0 -1
  42. package/build/index.js.map +1 -1
  43. package/build/permission/index.d.ts +1 -1
  44. package/build/permission/index.d.ts.map +1 -1
  45. package/build/permission/index.js +1 -1
  46. package/build/permission/index.js.map +1 -1
  47. package/build/permission/{model.d.ts → schemas.d.ts} +1 -1
  48. package/build/permission/schemas.d.ts.map +1 -0
  49. package/build/permission/{model.js → schemas.js} +1 -1
  50. package/build/permission/schemas.js.map +1 -0
  51. package/build/rely/index.d.ts +1 -1
  52. package/build/rely/index.d.ts.map +1 -1
  53. package/build/rely/index.js +1 -1
  54. package/build/rely/index.js.map +1 -1
  55. package/build/rely/{model.d.ts → schemas.d.ts} +1 -1
  56. package/build/rely/schemas.d.ts.map +1 -0
  57. package/build/rely/{model.js → schemas.js} +1 -1
  58. package/build/rely/schemas.js.map +1 -0
  59. package/package.json +2 -2
  60. package/src/allowance/index.ts +1 -1
  61. package/src/allowance/{model.ts → schemas.ts} +2 -2
  62. package/src/auth/index.ts +1 -1
  63. package/src/auth/{model.ts → schemas.ts} +1 -1
  64. package/src/consts.ts +1 -0
  65. package/src/entity/index.ts +1 -1
  66. package/src/entity/{profile.ts → schemas.ts} +1 -1
  67. package/src/helper/types.ts +22 -0
  68. package/src/helper.ts +44 -33
  69. package/src/index.ts +1 -1
  70. package/src/permission/index.ts +1 -1
  71. package/src/rely/index.ts +1 -1
  72. package/build/allowance/model.d.ts.map +0 -1
  73. package/build/allowance/model.js.map +0 -1
  74. package/build/auth/model.d.ts.map +0 -1
  75. package/build/auth/model.js.map +0 -1
  76. package/build/entity/profile.d.ts.map +0 -1
  77. package/build/permission/model.d.ts.map +0 -1
  78. package/build/permission/model.js.map +0 -1
  79. package/build/rely/model.d.ts.map +0 -1
  80. package/build/rely/model.js.map +0 -1
  81. package/build/utils.d.ts +0 -2
  82. package/build/utils.d.ts.map +0 -1
  83. package/build/utils.js +0 -3
  84. package/build/utils.js.map +0 -1
  85. package/src/utils.ts +0 -3
  86. /package/src/permission/{model.ts → schemas.ts} +0 -0
  87. /package/src/rely/{model.ts → schemas.ts} +0 -0
package/README.md CHANGED
@@ -3,22 +3,22 @@
3
3
  The core authentication and authorization vocabulary shared by server and client: the `Auth` /
4
4
  `AuthPayload` / `AuthCredentials` types, the `AuthRole` and `AuthenticationType` enums, the auth
5
5
  error hierarchy, AJV schemas for request bodies and record fields, the auth entrypoint aliases, and
6
- `entitySlugOf()` for reading the organization entity off a token. An app imports it whenever code
6
+ `authHelper.entitySlugOf()` for reading the organization entity off a token. An app imports it whenever code
7
7
  on either side of the wire needs to name an identity, throw an auth error, or reuse a scalar schema
8
8
  (`IdValueSchema`, `DateSchema`). It contains no services and no wiring: guards, the Ed25519 guard,
9
- shared auth protocols and organization-entity resolution (`entityKeyOf`, `requireEntityKey`,
10
- `attachEntity`) live in [`@owlmeans/auth-common`](../auth-common); the server auth service in
9
+ shared auth protocols and organization-entity resolution (`makeEntityScope(req)` —
10
+ `entityKeyOf`, `requireEntityKey`, `attachEntity`) live in [`@owlmeans/auth-common`](../auth-common); the server auth service in
11
11
  [`@owlmeans/server-auth`](../server-auth); the browser auth service in
12
12
  [`@owlmeans/client-auth`](../client-auth).
13
13
 
14
14
  ## Installation
15
15
 
16
16
  ```bash
17
- bun add @owlmeans/auth@^0.1.18-rc.39
17
+ bun add @owlmeans/auth@^0.1.18-rc.40
18
18
  ```
19
19
 
20
- `ajv` is a **peer** dependency — install it alongside, or `verifyAuth` / `verifyAuthCredentials`
21
- fail to resolve.
20
+ `ajv` is a **peer** dependency — install it alongside, or `authHelper.verifyAuth` /
21
+ `authHelper.verifyAuthCredentials` fail to resolve.
22
22
 
23
23
  ## Concepts
24
24
 
@@ -30,9 +30,9 @@ fail to resolve.
30
30
  - **Allowance / credentials** — the two-step handshake: a client posts an `AllowanceRequest` to get
31
31
  a `challenge`, then posts `AuthCredentials` (`challenge` + `credential`) to authenticate.
32
32
  - **Organization entity** — `entitySlug` is the renameable organization name and the only
33
- organization value on the wire. Read it with `entitySlugOf(payload)`. The stable `entityId` is
34
- never on the wire and is not declared here; server handlers get it from `requireEntityKey(req)` /
35
- `requireEntity(req)` in `@owlmeans/auth-common`.
33
+ organization value on the wire. Read it with `authHelper.entitySlugOf(payload)`. The stable `entityId` is
34
+ never on the wire and is not declared here; server handlers get it from
35
+ `makeEntityScope(req).requireEntityKey()` / `.requireEntity()` in `@owlmeans/auth-common`.
36
36
  - **Error hierarchy** — `AuthError` is the root of i18n-aware `ResilientError` subclasses that
37
37
  survive marshalling across a service boundary: `AuthUnknown` (no identity), `AuthenFailed`
38
38
  (credential rejected), `AuthForbidden` (authenticated, not allowed).
@@ -73,11 +73,11 @@ export const InvoiceSchema: JSONSchemaType<Invoice> = {
73
73
 
74
74
  A handler that finds no identity throws `AuthUnknown`; one that finds an identity without the right
75
75
  to act throws `AuthForbidden`. Organization-scoped records are keyed by the resolved id from
76
- `requireEntityKey`, never by the slug on the token.
76
+ `makeEntityScope(req).requireEntityKey()`, never by the slug on the token.
77
77
 
78
78
  ```ts
79
79
  import { AuthForbidden, AuthUnknown } from '@owlmeans/auth'
80
- import { requireEntityKey } from '@owlmeans/auth-common'
80
+ import { makeEntityScope } from '@owlmeans/auth-common'
81
81
  import { handlers } from '@owlmeans/server-api'
82
82
  import { invoiceProtocols } from 'my-app-common'
83
83
  import type { AppContext } from '../types.js'
@@ -88,13 +88,13 @@ export const listInvoices = api.request(invoiceProtocols.list, async (req, conte
88
88
  if (req.auth?.profileId == null) {
89
89
  throw new AuthUnknown('profile')
90
90
  }
91
- const entityId = requireEntityKey(req) // stable record id, never from the token
91
+ const entityId = makeEntityScope(req).requireEntityKey() // stable record id, never from the token
92
92
 
93
93
  return await loadInvoices(context, entityId, req.params.projectId)
94
94
  })
95
95
 
96
96
  export const archiveInvoice = api.request(invoiceProtocols.archive, async (req, context) => {
97
- const entityId = requireEntityKey(req)
97
+ const entityId = makeEntityScope(req).requireEntityKey()
98
98
  if (!req.auth!.scopes.includes('invoice-admin')) {
99
99
  throw new AuthForbidden('permission')
100
100
  }
@@ -112,14 +112,14 @@ A gate service declared on a protocol (`gate: { alias, params }`) asserts scopes
112
112
  import { createLazyService } from '@owlmeans/context'
113
113
  import type { GateService } from '@owlmeans/entrypoint'
114
114
  import { ALL_SCOPES, AuthForbidden } from '@owlmeans/auth'
115
- import { entityKeyOf } from '@owlmeans/auth-common'
115
+ import { makeEntityScope } from '@owlmeans/auth-common'
116
116
 
117
117
  export const makeProjectGate = (alias: string = 'my-app:project-gate'): GateService =>
118
118
  createLazyService<GateService>(alias, {
119
119
  assert: async (req, _, params) => {
120
120
  if (req.auth == null) throw new AuthForbidden('auth')
121
121
 
122
- const entityId = entityKeyOf(req)
122
+ const entityId = makeEntityScope(req).entityKeyOf()
123
123
  if (entityId == null) throw new AuthForbidden('entity')
124
124
 
125
125
  // Params name the organization by its stable id, matching how grants are stored.
@@ -135,12 +135,12 @@ export const makeProjectGate = (alias: string = 'my-app:project-gate'): GateServ
135
135
  ### Authenticate a socket connection
136
136
 
137
137
  A socket authenticates after its connection is open, so it moves through `AuthenticationStage`
138
- itself, sets the bearer token under `AUTH_HEADER`, and must call `attachEntity`.
138
+ itself, sets the bearer token under `AUTH_HEADER`, and must call `makeEntityScope(req).attachEntity(context)`.
139
139
 
140
140
  ```ts
141
141
  import type { Auth, AuthToken } from '@owlmeans/auth'
142
142
  import { AUTH_HEADER, AuthenFailed, AuthenticationStage, AuthUnknown } from '@owlmeans/auth'
143
- import { attachEntity, DEFAULT_GUARD } from '@owlmeans/auth-common'
143
+ import { DEFAULT_GUARD, makeEntityScope } from '@owlmeans/auth-common'
144
144
  import type { AbstractRequest, AbstractResponse, GuardService } from '@owlmeans/entrypoint'
145
145
  import { provideResponse } from '@owlmeans/entrypoint'
146
146
  import type { AppContext } from '../types.js'
@@ -158,7 +158,7 @@ export const authenticateSocket = (context: AppContext, req: AbstractRequest) =>
158
158
  }
159
159
 
160
160
  req.auth = res.value
161
- await attachEntity(context, req)
161
+ await makeEntityScope(req).attachEntity(context)
162
162
 
163
163
  return [AuthenticationStage.Authenticated, true]
164
164
  }
@@ -166,14 +166,14 @@ export const authenticateSocket = (context: AppContext, req: AbstractRequest) =>
166
166
 
167
167
  ### Build payloads, read the organization, widen a token schema
168
168
 
169
- `AuthRole` is a string enum, `entitySlugOf` is the only supported way to read the organization off a
169
+ `AuthRole` is a string enum, `authHelper.entitySlugOf` is the only supported way to read the organization off a
170
170
  payload, and `AuthTokenSchema` caps `token` at 1024 characters — a route carrying a wrapped
171
171
  credential envelope declares its own wider schema.
172
172
 
173
173
  ```ts
174
174
  import type { JSONSchemaType } from 'ajv'
175
175
  import type { AuthPayload, AuthToken } from '@owlmeans/auth'
176
- import { AuthRole, AuthenticationType, entitySlugOf, isAuthToken } from '@owlmeans/auth'
176
+ import { AuthRole, AuthenticationType, authHelper } from '@owlmeans/auth'
177
177
 
178
178
  const payload: AuthPayload = {
179
179
  type: AuthenticationType.OneTimeToken,
@@ -184,7 +184,7 @@ const payload: AuthPayload = {
184
184
  scopes: ['my-app-project'],
185
185
  }
186
186
 
187
- const orgLabel = entitySlugOf(payload) // string | undefined — opaque, never a database key
187
+ const orgLabel = authHelper.entitySlugOf(payload) // string | undefined — opaque, never a database key
188
188
 
189
189
  export const WrappedTokenSchema: JSONSchemaType<AuthToken> = {
190
190
  type: 'object',
@@ -194,7 +194,7 @@ export const WrappedTokenSchema: JSONSchemaType<AuthToken> = {
194
194
  }
195
195
 
196
196
  export const tokenOf = (body: unknown): string | undefined =>
197
- isAuthToken(body) ? body.token : undefined
197
+ authHelper.isAuthToken(body) ? body.token : undefined
198
198
  ```
199
199
 
200
200
  ## API
@@ -286,23 +286,24 @@ an optional message suffix (default `'error'`).
286
286
 
287
287
  | Symbol | Kind | Purpose |
288
288
  |--------|------|---------|
289
- | `entitySlugOf(payload?)` | function | The organization carried by a payload: `entitySlug`, falling back to a legacy `entityId` |
290
- | `verifyAuth(auth)` | function | Validate against `AuthSchema` (AJV with formats) |
291
- | `verifyAuthCredentials(auth)` | function | Validate against `AuthCredentialsSchema` |
292
- | `isAuth(value)` | type guard | Has `token` and `isUser` |
293
- | `isAuthCredentials(value)` | type guard | Has `challenge` and `credential` |
294
- | `isAuthToken(value)` | type guard | Has a string `token` |
289
+ | `authHelper.entitySlugOf(payload?)` | method | The organization carried by a payload: `entitySlug`, falling back to a legacy `entityId` |
290
+ | `authHelper.verifyAuth(auth)` | method | Validate against `AuthSchema` (AJV with formats) |
291
+ | `authHelper.verifyAuthCredentials(auth)` | method | Validate against `AuthCredentialsSchema` |
292
+ | `authHelper.isAuth(value)` | type guard | Has `token` and `isUser` |
293
+ | `authHelper.isAuthCredentials(value)` | type guard | Has `challenge` and `credential` |
294
+ | `authHelper.isAuthToken(value)` | type guard | Has a string `token` |
295
295
  | `buildSupervisorPayload(challenge, userId, salt)` | function | The canonical payload the PK supervisor login signs and verifies |
296
296
 
297
297
  ## Common pitfalls
298
298
 
299
299
  - `AuthRole` is a **string** enum — use the members; numeric literals do not compile.
300
- - Read the organization with `entitySlugOf()`, never `payload.entitySlug` directly. Its result may
300
+ - Read the organization with `authHelper.entitySlugOf()`, never `payload.entitySlug` directly. Its result may
301
301
  be a legacy `entityId`, so treat it as an opaque key: never compose names from it and never write
302
- it as a database key — use `requireEntityKey` / `requireEntity` from `@owlmeans/auth-common`.
302
+ it as a database key — use `makeEntityScope(req).requireEntityKey()` / `.requireEntity()` from
303
+ `@owlmeans/auth-common`.
303
304
  - Never put `entityId` on the wire (tokens, URLs, query params, forms) — only `entitySlug`.
304
305
  - Any code path that establishes authentication outside the HTTP boundary (sockets) must call
305
- `attachEntity(context, request)`, or `request.entity` stays empty.
306
+ `makeEntityScope(request).attachEntity(context)`, or `request.entity` stays empty.
306
307
  - Pick the right error: a gate denial is `AuthForbidden`, a missing identity is `AuthUnknown`, a
307
308
  failed credential check is `AuthenFailed`.
308
309
  - `AuthCredentialsSchema` requires `type`, `role` and `scopes` on every authenticate call.
@@ -330,7 +331,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
330
331
  your project's skill store (`.agents/skills/`):
331
332
 
332
333
  ```sh
333
- npx @owlmeans/agent-skills@^0.1.18-rc.48
334
+ npx @owlmeans/agent-skills@^0.1.18-rc.49
334
335
  ```
335
336
 
336
337
  The embedded files are version-matched to this package release. Do not edit them
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
3
  "package": "@owlmeans/auth",
4
- "version": "0.1.18-rc.39",
5
- "generatedAt": "2026-10-05T08:32:19.088Z",
4
+ "version": "0.1.18-rc.40",
5
+ "generatedAt": "2026-10-05T21:03:06.362Z",
6
6
  "canonicalRepo": "https://github.com/owlmeans/common",
7
7
  "entries": [
8
8
  {
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: auth
3
- description: How to use @owlmeans/auth — the core authentication and authorization vocabulary shared by server and client, covering the Auth / AuthPayload / AuthCredentials types, the AuthRole and AuthenticationType enums, the error hierarchy (AuthUnknown, AuthenFailed, AuthForbidden …), the request JSON schemas, the entrypoint aliases, and entitySlugOf for reading the organization entity off a token. Auto-invoked when importing auth types, errors, schemas or constants, or when working with request authentication.
3
+ description: How to use @owlmeans/auth — the core authentication and authorization vocabulary shared by server and client, covering the Auth / AuthPayload / AuthCredentials types, the AuthRole and AuthenticationType enums, the error hierarchy (AuthUnknown, AuthenFailed, AuthForbidden …), the request JSON schemas, the entrypoint aliases, and authHelper.entitySlugOf for reading the organization entity off a token. Auto-invoked when importing auth types, errors, schemas or constants, or when working with request authentication.
4
4
  user-invocable: false
5
5
  ---
6
6
  <!-- AUTO-GENERATED — do not edit. Regenerate via sync-agent-meta. -->
@@ -8,7 +8,7 @@ user-invocable: false
8
8
  # @owlmeans/auth
9
9
 
10
10
  **Layer:** Core
11
- **Install:** `"@owlmeans/auth": "^0.1.18-rc.39"` in `dependencies`
11
+ **Install:** `"@owlmeans/auth": "^0.1.18-rc.40"` in `dependencies`
12
12
 
13
13
  Types, enums, errors and schemas only — no services, no wiring. Every other auth package builds on
14
14
  this vocabulary, so a symbol belongs here exactly when both a server and a browser need to agree on
@@ -79,9 +79,9 @@ it.
79
79
  | `AuthSchema`, `AuthTokenSchema`, `OptionalAuthTokenSchema` | Resolved auth and bearer-token bodies |
80
80
  | `ProfileSchema`, `RelyChallengeSchema`, `PermissionSetSchema`, `AttributeSetSchema`, `CapabiltiesSchema` | Record and permission schemas |
81
81
  | `ScopeValueSchema`, `PermissionValueSchema`, `ResourceValueSchema`, `AttributeValueSchema`, `EntitySlugValueSchema`, `GroupValueSchema`, `TypeNameSchema`, `EnumValueSchema`, `IdValueSchema`, `DateSchema`, `AuthRoleSchema` | Reusable scalar schemas |
82
- | `entitySlugOf(payload)` | The organization entity carried by an auth payload — its `entitySlug`, falling back to an `entityId` the payload may carry instead — see below |
83
- | `verifyAuth`, `verifyAuthCredentials` | Validate against `AuthSchema` / `AuthCredentialsSchema` |
84
- | `isAuth`, `isAuthCredentials`, `isAuthToken` | Type guards |
82
+ | `authHelper.entitySlugOf(payload)` | The organization entity carried by an auth payload — its `entitySlug`, falling back to an `entityId` the payload may carry instead — see below |
83
+ | `authHelper.verifyAuth`, `authHelper.verifyAuthCredentials` | Validate against `AuthSchema` / `AuthCredentialsSchema` |
84
+ | `authHelper.isAuth`, `authHelper.isAuthCredentials`, `authHelper.isAuthToken` | Type guards |
85
85
  | `buildSupervisorPayload`, `SupervisorCredentialPayload` | The payload the PK supervisor login signs — see the `supervisor-auth` skill |
86
86
 
87
87
  `AuthTokenSchema` caps `token` at 1024 characters. A route that accepts a token wrapping a full
@@ -95,23 +95,23 @@ query params and request bodies. No `entityId` is declared on any type here —
95
95
  an implementation stores its rows against belongs to whichever package owns the organization
96
96
  registry, and is resolved from the slug at the server boundary.
97
97
 
98
- Read the value through `entitySlugOf()` rather than off the field. A token is signed once and then
99
- read for as long as it lives, across deployments, and the helper absorbs that spread: when
98
+ Read the value through `authHelper.entitySlugOf()` rather than off the field. A token is signed once
99
+ and then read for as long as it lives, across deployments, and the helper absorbs that spread: when
100
100
  `entitySlug` is absent it returns an `entityId` the payload carries instead, so a payload that names
101
101
  the organization under either field resolves through one code path. That fallback is why the helper
102
102
  is the only supported way to get the value out of a payload:
103
103
 
104
104
  ```typescript
105
- import { entitySlugOf } from '@owlmeans/auth'
105
+ import { authHelper } from '@owlmeans/auth'
106
106
 
107
- const slug = entitySlugOf(req.auth) // string | undefined
107
+ const slug = authHelper.entitySlugOf(req.auth) // string | undefined
108
108
  ```
109
109
 
110
110
  Because of that fallback the result is not guaranteed to be a slug: a payload carrying only
111
111
  `entityId` yields that id. Treat it as an opaque organization key, never as a name to compose from
112
- and never as a database key written directly — `@owlmeans/auth-common` exports `entityKeyOf` /
113
- `requireEntityKey` for storage keys, and they prefer the resolved id; a user-facing name wants the
114
- resolved entity's current slug.
112
+ and never as a database key written directly — `@owlmeans/auth-common`'s
113
+ `makeEntityScope(req).entityKeyOf()` / `.requireEntityKey()` give storage keys, and they prefer the
114
+ resolved id; a user-facing name wants the resolved entity's current slug.
115
115
 
116
116
  ## AuthRole is a string enum
117
117
 
@@ -129,11 +129,11 @@ const creds: AuthCredentials = { role: AuthRole.User, /* … */ } as AuthCredent
129
129
  Throw from a handler when the request is missing the identity it needs:
130
130
 
131
131
  ```typescript
132
- import { AuthUnknown, entitySlugOf } from '@owlmeans/auth'
132
+ import { AuthUnknown, authHelper } from '@owlmeans/auth'
133
133
  import { handlers } from '@owlmeans/server-app'
134
134
 
135
135
  export const list = handlers<Context>().request(projectProtocols.list, async (req, context) => {
136
- const slug = entitySlugOf(req.auth)
136
+ const slug = authHelper.entitySlugOf(req.auth)
137
137
  if (slug == null) throw new AuthUnknown('entity')
138
138
 
139
139
  return await listProjects(context, slug)
@@ -159,6 +159,6 @@ Rules of thumb:
159
159
  - `@owlmeans/error` — every error class extends `ResilientError`, which is what makes the messages
160
160
  translatable and re-throwable across the wire
161
161
  - `ajv-formats` — date/time formats for the `verify*` helpers
162
- - `ajv` — a **peer** dependency (`"*"`), not a direct one: `verifyAuth` / `verifyAuthCredentials`
163
- construct `new Ajv({ strict: false })`. Install it alongside this package, or those two helpers
164
- fail to resolve.
162
+ - `ajv` — a **peer** dependency (`"*"`), not a direct one: `authHelper.verifyAuth` /
163
+ `authHelper.verifyAuthCredentials` construct `new Ajv({ strict: false })`. Install it alongside
164
+ this package, or those two helpers fail to resolve.
@@ -17,7 +17,7 @@ The system supports multiple authentication paths that share the same `Auth` and
17
17
  Use case: service-to-service, wallet provider, backend clients, high-security browser-issued tokens.
18
18
 
19
19
  1. **Allowance**: client posts `AllowanceRequest` (a partial `AuthPayload`) to `/authentication/init`. Server returns `AllowanceResponse { challenge }`.
20
- 2. **Credential generation**: client builds `AuthCredentials` (challenge + ephemeral payload), signs the canonicalized payload with its Ed25519 keypair via `packAuthCredentials()` (`@owlmeans/basic-keys`), posts to `/authentication/authenticate`.
20
+ 2. **Credential generation**: client builds `AuthCredentials` (challenge + ephemeral payload), signs the canonicalized payload with its Ed25519 keypair via `authCredentialsHelper.packAuthCredentials()` (`@owlmeans/basic-keys`), posts to `/authentication/authenticate`.
21
21
  3. **Credential envelope**: the auth manager opens the signed challenge with the `AUTH_SRV_KEY` record it loads from the `TRUSTED` config resource via `trust()` (`@owlmeans/auth-common/utils`), burns the decoded challenge into `AUTH_CACHE` (create-once, so one challenge is spent once), then hands the credential to the plugin for its type. The basic-ed25519 plugin loads the caller's own `TRUSTED` record by `userId` and verifies the signature over the challenge, then rewrites the credential's `type` to `AuthenticationType.OneTimeToken` with a fresh one-time token as its challenge. The manager canonicalizes `entitySlug` through `ENTITY_RESOLVER` where one is registered, stamps its own trusted id onto `credential.credential`, and answers with an `EnvelopeModel<AuthCredentials>` of the credential's own type, signed with `AUTH_SRV_KEY`.
22
22
  4. **Token exchange**: the client posts that envelope as an `AuthToken` to the consuming service's `DISPATCHER_AUTHEN` entrypoint (`/authenticate`). `makeAuthService.authenticate()` (`@owlmeans/server-auth`) verifies it against `AUTH_SRV_KEY`, burns the one-time token into its own `AUTH_CACHE`, checks that `credential.credential` names the auth manager, builds the `Auth` from the credential's `userId` / `scopes` / `role` / `profileId` / `entitySlug`, and returns it as an envelope of type `ed25519-basic-token` signed with that service's own key.
23
23
  5. **Bearer**: client sends `Authorization: ED25519-BASIC-TOKEN <encoded>`.
@@ -41,7 +41,7 @@ Use case: a deployment that signs its own people in through Google, OIDC or an e
41
41
  1. Browser imports `@owlmeans/web-oidc-rp/auth/plugins`, which registers OIDC and Google plugins in `@owlmeans/client-auth`.
42
42
  2. The plugin persists auth control state, redirects to the provider, restores state on return, and submits code/query params as `AuthCredentials`.
43
43
  3. Server exchanges the provider code through `@owlmeans/server-oidc-rp`. The Google plugin refuses a userinfo whose `email_verified` is not `true` (`AuthenFailed('email-verified')`): the address is what links the sign-in to an account.
44
- 4. The linking service (`AUTH_IDENTITY_LINKING`) maps `ProviderProfileDetails` onto the identity model ("The identity model"): `getLinkedProfile` follows the method's credential to its account and answers the row of THIS deployment's app in the account's main organization; otherwise `linkProfile(details, { username: verifiedEmail })` runs `ensureAccount` — a further method of a known address becomes another credential on the same account, a new address registers an account with a personal organization — and `ensureProfile` for the deployment's own app there (`owner: true`, `scopes: ['*']`).
44
+ 4. The linking service (`AUTH_IDENTITY_LINKING`) maps `ProviderProfileDetails` onto the identity model ("The identity model"): `getLinkedProfile` follows the method's credential to its account and answers the row of THIS deployment's app in the account's main organization; otherwise `linkProfile(details, { username: verifiedEmail })` runs `identityOf(ctx).ensureAccount` — a further method of a known address becomes another credential on the same account, a new address registers an account with a personal organization — and `.ensureProfile` for the deployment's own app there (`owner: true`, `scopes: ['*']`).
45
45
  5. Server returns a normal OwlMeans bearer token carrying the organization's `entitySlug` and the row's `profileId`. Downstream product gates authorize against that row — requiring its `service` to be the deployment's own app, because the same organization holds hosted apps' rows — not against `OIDC_GATE`.
46
46
 
47
47
  ### Email one-time code
@@ -62,7 +62,7 @@ Use case: an application a deployment hosts (a generated target) signs its end u
62
62
  4. `findAccount` asks `subjects.resolve(clientId, accountId)` for the claims. `null` (no row of the app, a disabled or expired primary row) refuses the account, and the provider's `account_refused` login check sends the browser back to the login screen instead of failing the consent.
63
63
  5. The claims: `sub` = the pairwise subject, `email`, `permissions`, and `organizations` under its scope. The account's record id never leaves the provider.
64
64
 
65
- **Pairwise subjects.** Every client sees its own subject for one account: `profileIdOf(clientId, accountId)` (`subjects.identify`) — the very `profileId` of the account's rows of that app — the same in the id_token, userinfo and introspection, and different for every other client, so two apps cannot correlate their users. The provider configuration that produces it (pairwise-only, the sector URI, `claims()` answering the account id) is governed by `server-oidc-provider` → "Pairwise subjects".
65
+ **Pairwise subjects.** Every client sees its own subject for one account: `identityKeyHelper.profileIdOf(clientId, accountId)` (`subjects.identify`) — the very `profileId` of the account's rows of that app — the same in the id_token, userinfo and introspection, and different for every other client, so two apps cannot correlate their users. The provider configuration that produces it (pairwise-only, the sector URI, `claims()` answering the account id) is governed by `server-oidc-provider` → "Pairwise subjects".
66
66
 
67
67
  ### PK supervisor (development only)
68
68
 
@@ -83,13 +83,14 @@ the protocol relies on these rules:
83
83
  - **Account** — the person, ONE per e-mail; `entityId` = its personal organization. Every sign-in
84
84
  method (e-mail code, Google, PK supervisor) is a **credential** on the account, never on a row.
85
85
  - **Profile row** — one per (account, app, organization); `service` = the app (the deployment's own
86
- key, or a hosted app's client id); `profileId = profileIdOf(service, accountId)` is computed, the
87
- same on every row of one (account, app), and is the pairwise subject that app's client sees. The
88
- PRIMARY row (in the personal organization) carries `home` and `disabled`.
86
+ key, or a hosted app's client id); `profileId = identityKeyHelper.profileIdOf(service, accountId)`
87
+ is computed, the same on every row of one (account, app), and is the pairwise subject that app's
88
+ client sees. The PRIMARY row (in the personal organization) carries `home` and `disabled`.
89
89
  - **Organization** (`OrgEntity`) — `slug` (the wire `entitySlug`, renameable), `iamKey` (frozen,
90
90
  claimed as `entityKey`, server-side only) and the organization's **groups** inside the document.
91
91
  - Registration anywhere creates the account, its personal organization and an owner row of the app
92
- signing in. The address IS the identity: every caller of `ensureAccount` must have verified it.
92
+ signing in. The address IS the identity: every caller of `identityOf(ctx).ensureAccount` must have
93
+ verified it.
93
94
 
94
95
  ## Organizations and the session
95
96
 
@@ -102,12 +103,13 @@ the client asks for `ORGANIZATIONS_SCOPE` and each subject acts in organizations
102
103
  governed by `server-oidc-rp` → "Organizations" (claims, session record, browser-token contents,
103
104
  the switch handlers).
104
105
  - **The request entity** on such a relying party is `{ id: entityKey, slug, iamKey: entityKey }`,
105
- attached by the OIDC guard; `requireEntityKey(req)` answers the `entityKey` — the tenant key a
106
- hosted app stores its records by (`auth-common` → "The organization entity").
107
- - **Browser**: `listOrganizations` / `switchOrganization` (`client-iam`). **Server**:
108
- `organizationsOf` / `organizationOf` and the runtime IAM client `iamRuntime` (`server-iam`) over the
109
- provider's runtime IAM API (`makeIamRuntimeProtocols`, `iam` skill), advertised as the discovery
110
- field `owlmeans_iam_api`.
106
+ attached by the OIDC guard; `makeEntityScope(req).requireEntityKey()` answers the `entityKey` —
107
+ the tenant key a hosted app stores its records by (`auth-common` → "The organization entity").
108
+ - **Browser**: `organizationSwitchOf(ctx).listOrganizations` / `.switchOrganization` (`client-iam`).
109
+ **Server**: `makeOrganizationScope(context, request).organizationsOf` / `.organizationOf` and the
110
+ runtime IAM client `makeIamRuntimeClient(context, request)` (`server-iam`) over the provider's
111
+ runtime IAM API (`makeIamRuntimeProtocols`, `iam` skill), advertised as the discovery field
112
+ `owlmeans_iam_api`.
111
113
 
112
114
  ## Permission kinds
113
115
 
@@ -123,7 +125,7 @@ The payload chain is `Authorization` (`entitySlug?`, `scopes`, `permissions?`,
123
125
  (+ `groups?`) → `AuthPayload` (+ `type`, `role`, `userId`, `profileId?`, …) → `AuthCredentials`
124
126
  (+ `challenge`, `credential`) for authentication and `Auth` (+ `token`, `isUser`, `createdAt`) for a
125
127
  resolved identity. **`entitySlug` is the only organization-entity value on the wire**; read it with
126
- `entitySlugOf(payload)`, never off the field. Where each name is governed:
128
+ `authHelper.entitySlugOf(payload)`, never off the field. Where each name is governed:
127
129
 
128
130
  - types, `AuthRole` (a **string** enum), `AuthenticationType`, query/header constants, the error
129
131
  hierarchy (`AuthError` root; `AuthUnknown` 400, `AuthorizationError` → `AuthForbidden`,
@@ -187,9 +189,9 @@ identities — the auth service, peer services, wallet providers, supervisors (`
187
189
  ## Key model
188
190
 
189
191
  `KeyPairModel` (`@owlmeans/basic-keys`, `basic-keys` skill) signs, verifies and exports
190
- `ed25519:<base64>` keys; `makeKeyPairModel(input?)` builds one, `fromPubKey(credential)` a
191
- verify-only one, and `packAuthCredentials(auth, extra, signer)` signs an `AuthCredentials` for the
192
- Ed25519 path.
192
+ `ed25519:<base64>` keys; `makeKeyPairModel(input?)` builds one, `keyHelper.fromPubKey(credential)` a
193
+ verify-only one, and `authCredentialsHelper.packAuthCredentials(auth, extra, signer)` signs an
194
+ `AuthCredentials` for the Ed25519 path.
193
195
 
194
196
  ## Setup wiring
195
197
 
@@ -222,17 +224,18 @@ Two places resolve the organization entity, and both are required:
222
224
  `credential.entitySlug` is resolved and rewritten to the current one, so a token is canonical for
223
225
  as long as it lives. An unresolvable value throws `AuthenFailed('entity')`.
224
226
  2. **At every server boundary that establishes authentication** — the HTTP boundary, and any socket
225
- that authenticates after its connection is open — via `attachEntity(context, request)`
226
- (`@owlmeans/auth-common`), which sets `request.entity` and canonicalizes a retired slug.
227
+ that authenticates after its connection is open — via
228
+ `makeEntityScope(request).attachEntity(context)` (`@owlmeans/auth-common`), which sets
229
+ `request.entity` and canonicalizes a retired slug.
227
230
 
228
- Handlers then key their records on `entityKeyOf(req)` / `requireEntityKey(req)`, which prefer the
229
- resolved id and fall back to the slug where no resolver is registered. A boundary that skips step 2
230
- leaves `request.entity` empty and its handlers silently compare a slug against stored ids — which
231
- surfaces as "this record does not exist", not as a missing resolution.
231
+ Handlers then key their records on `makeEntityScope(req).entityKeyOf()` / `.requireEntityKey()`,
232
+ which prefer the resolved id and fall back to the slug where no resolver is registered. A boundary
233
+ that skips step 2 leaves `request.entity` empty and its handlers silently compare a slug against
234
+ stored ids — which surfaces as "this record does not exist", not as a missing resolution.
232
235
 
233
236
  A relying party of a tenanted client has no registry to resolve from: there the OIDC guard attaches
234
- the session's acting organization itself, and `attachEntity` keeps it only while its slug is exactly
235
- the token's (`auth-common` → "The organization entity").
237
+ the session's acting organization itself, and `makeEntityScope(…).attachEntity` keeps it only while
238
+ its slug is exactly the token's (`auth-common` → "The organization entity").
236
239
 
237
240
  ## Mocking points (for category-B tests)
238
241
 
@@ -1,2 +1,2 @@
1
- export * from './model.js';
1
+ export * from './schemas.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/allowance/index.ts"],"names":[],"mappings":"AACA,cAAc,YAAY,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/allowance/index.ts"],"names":[],"mappings":"AACA,cAAc,cAAc,CAAA"}
@@ -1,2 +1,2 @@
1
- export * from './model.js';
1
+ export * from './schemas.js';
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/allowance/index.ts"],"names":[],"mappings":"AACA,cAAc,YAAY,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/allowance/index.ts"],"names":[],"mappings":"AACA,cAAc,cAAc,CAAA"}
@@ -4,4 +4,4 @@ export declare const PartialAuthPayloadSchema: JSONSchemaType<Omit<Partial<AuthP
4
4
  export declare const AllowanceRequestSchema: JSONSchemaType<AllowanceRequest>;
5
5
  export declare const AuthCredentialsSchema: JSONSchemaType<AuthCredentials>;
6
6
  export declare const AuthSchema: JSONSchemaType<Auth>;
7
- //# sourceMappingURL=model.d.ts.map
7
+ //# sourceMappingURL=schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/allowance/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAA;AACzC,OAAO,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAQvF,eAAO,MAAM,wBAAwB,EAAE,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC,CAkBvF,CAAA;AAED,eAAO,MAAM,sBAAsB,EAAE,cAAc,CAAC,gBAAgB,CAQnE,CAAA;AAED,eAAO,MAAM,qBAAqB,EAAE,cAAc,CAAC,eAAe,CAajE,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,cAAc,CAAC,IAAI,CAe3C,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import { AuthRoleSchema, EntitySlugValueSchema, GroupValueSchema, IdValueSchema, DateSchema, ScopeValueSchema, TypeNameSchema } from '../consts.js';
2
- import { AuthPayloadSchema } from '../auth/model.js';
3
- import { AttributeSetSchema, PermissionSetSchema } from '../permission/model.js';
2
+ import { AuthPayloadSchema } from '../auth/schemas.js';
3
+ import { AttributeSetSchema, PermissionSetSchema } from '../permission/schemas.js';
4
4
  export const PartialAuthPayloadSchema = {
5
5
  type: 'object',
6
6
  properties: {
@@ -59,4 +59,4 @@ export const AuthSchema = {
59
59
  ],
60
60
  additionalProperties: false,
61
61
  };
62
- //# sourceMappingURL=model.js.map
62
+ //# sourceMappingURL=schemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../src/allowance/schemas.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,cAAc,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,aAAa,EAAE,UAAU,EAClF,gBAAgB,EAAE,cAAc,EACjC,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA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ACrE,SAAS,EAAE,EAAE,GAAG,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC5C,GAAG,iBAAiB,CAAC,UAAU;KAChC;IACD,QAAQ,EAAE;QACR,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ;KACzD;IACD,oBAAoB,EAAE,KAAK;CAC5B,CAAA"}
@@ -1,2 +1,2 @@
1
- export * from './model.js';
1
+ export * from './schemas.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AACA,cAAc,YAAY,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AACA,cAAc,cAAc,CAAA"}
@@ -1,2 +1,2 @@
1
- export * from './model.js';
1
+ export * from './schemas.js';
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AACA,cAAc,YAAY,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AACA,cAAc,cAAc,CAAA"}
@@ -5,4 +5,4 @@ export declare const ProfilePayloadSchema: JSONSchemaType<ProfilePayload>;
5
5
  export declare const AuthPayloadSchema: JSONSchemaType<AuthPayload>;
6
6
  export declare const AuthTokenSchema: JSONSchemaType<AuthToken>;
7
7
  export declare const OptionalAuthTokenSchema: JSONSchemaType<Partial<AuthToken>>;
8
- //# sourceMappingURL=model.d.ts.map
8
+ //# sourceMappingURL=schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/auth/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAA;AACzC,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAOxF,eAAO,MAAM,mBAAmB,EAAE,cAAc,CAAC,aAAa,CAY7D,CAAA;AAED,eAAO,MAAM,oBAAoB,EAAE,cAAc,CAAC,cAAc,CAQ/D,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,cAAc,CAAC,WAAW,CAazD,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,cAAc,CAAC,SAAS,CAOrD,CAAA;AAED,eAAO,MAAM,uBAAuB,EAAE,cAAc,CAAC,OAAO,CAAC,SAAS,CAAC,CAOtE,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import { EntitySlugValueSchema, EnumValueSchema, GroupValueSchema, IdValueSchema, DateSchema, ScopeValueSchema, TypeNameSchema } from '../consts.js';
2
- import { AttributeSetSchema, PermissionSetSchema } from '../permission/model.js';
2
+ import { AttributeSetSchema, PermissionSetSchema } from '../permission/schemas.js';
3
3
  export const AuthorizationSchema = {
4
4
  type: 'object',
5
5
  properties: {
@@ -52,4 +52,4 @@ export const OptionalAuthTokenSchema = {
52
52
  required: [],
53
53
  additionalProperties: false,
54
54
  };
55
- //# sourceMappingURL=model.js.map
55
+ //# sourceMappingURL=schemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../src/auth/schemas.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,qBAAqB,EAAE,eAAe,EAAE,gBAAgB,EAAE,aAAa,EAAE,UAAU,EAAE,gBAAgB,EACrG,cAAc,EACf,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAElF,MAAM,CAAC,MAAM,mBAAmB,GAAkC;IAChE,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,UAAU,EAAE,EAAE,GAAG,qBAAqB,EAAE,QAAQ,EAAE,IAAI,EAAE;QACxD,MAAM,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E,GAAG,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE;KACtC;IACR,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC;IACpC,oBAAoB,EAAE,KAAK;CAC5B,CAAA;AAED,MAAM,CAAC,MAAM,eAAe,GAA8B;IACxD,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE;KAC1D;IACD,QAAQ,EAAE,CAAC,OAAO,CAAC;IACnB,oBAAoB,EAAE,KAAK;CAC5B,CAAA;AAED,MAAM,CAAC,MAAM,uBAAuB,GAAuC;IACzE,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE;KAC1E;IACD,QAAQ,EAAE,EAAE;IACZ,oBAAoB,EAAE,KAAK;CAC5B,CAAA"}
package/build/consts.d.ts CHANGED
@@ -75,6 +75,7 @@ export declare const AUTH_QUERY = "token";
75
75
  export declare const ENTITY_QUERY = "entitySlug";
76
76
  export declare const PROFILE_QUERY = "profile";
77
77
  export declare const MOD_RECAPTCHA = "_external:re-captcha";
78
+ export declare const CMOD_RECAPTCHA: string;
78
79
  export declare const GUEST_ID = "__guest";
79
80
  export declare const RELY_3RD = "rely";
80
81
  //# sourceMappingURL=consts.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAA;AAEzC,eAAO,MAAM,OAAO,MAAM,CAAA;AAC1B,eAAO,MAAM,OAAO,MAAM,CAAA;AAC1B,eAAO,MAAM,QAAQ,MAAM,CAAA;AAC3B,eAAO,MAAM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;AAE3G,eAAO,MAAM,oBAAoB,EAAE,cAAc,CAAC,MAAM,CAAoD,CAAA;AAE5G,eAAO,MAAM,qBAAqB,EAAE,cAAc,CAAC,MAAM,CAAoD,CAAA;AAE7G,oGAAoG;AACpG,eAAO,MAAM,iBAAiB,EAAE,cAAc,CAAC,MAAM,CAAyB,CAAA;AAE9E,eAAO,MAAM,gBAAgB,EAAE,cAAc,CAAC,MAAM,CAAoD,CAAA;AAExG,eAAO,MAAM,cAAc,EAAE,cAAc,CAAC,MAAM,CAAmD,CAAA;AAErG,eAAO,MAAM,eAAe,EAAE,cAAc,CAAC,MAAM,CAAmD,CAAA;AAEtG,eAAO,MAAM,aAAa,EAAE,cAAc,CAAC,MAAM,CAAoD,CAAA;AAErG,eAAO,MAAM,UAAU,EAAE,cAAc,CAAC,IAAI,CAA8E,CAAA;AAE1H,eAAO,MAAM,cAAc,EAAE,cAAc,CAAC,QAAQ,CAAqD,CAAA;AAEzG,eAAO,MAAM,UAAU,eAAe,CAAA;AACtC,eAAO,MAAM,iBAAiB,8BAAiC,CAAA;AAE/D;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,yBAA4B,CAAA;AAE7D,eAAO,MAAM,WAAW,wBAAmB,CAAA;AAE3C,eAAO,MAAM,WAAW,kBAAkB,CAAA;AAC1C,eAAO,MAAM,UAAU,UAAU,CAAA;AACjC,eAAO,MAAM,YAAY,eAAe,CAAA;AACxC,eAAO,MAAM,aAAa,YAAY,CAAA;AAEtC,eAAO,MAAM,aAAa,yBAAyB,CAAA;AACnD,eAAO,MAAM,cAAc,QAAsC,CAAA;AAEjE,eAAO,MAAM,QAAQ,YAAY,CAAA;AACjC,eAAO,MAAM,QAAQ,SAAS,CAAA"}
package/build/consts.js CHANGED
@@ -112,6 +112,7 @@ export const AUTH_QUERY = 'token';
112
112
  export const ENTITY_QUERY = 'entitySlug';
113
113
  export const PROFILE_QUERY = 'profile';
114
114
  export const MOD_RECAPTCHA = '_external:re-captcha';
115
+ export const CMOD_RECAPTCHA = `_client-${MOD_RECAPTCHA.slice(1)}`;
115
116
  export const GUEST_ID = '__guest';
116
117
  export const RELY_3RD = 'rely';
117
118
  //# sourceMappingURL=consts.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"consts.js","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,OAAO,GAAG,GAAG,CAAA;AAC1B,MAAM,CAAC,MAAM,OAAO,GAAG,GAAG,CAAA;AAC1B,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,CAAA;AAC3B,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,CAAA;AAE5B,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAA;AAC7B,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAA;AAElC,MAAM,CAAN,IAAY,QAQX;AARD,WAAY,QAAQ;IAClB,yBAAa,CAAA;IACb,2BAAe,CAAA;IACf,+BAAmB,CAAA;IACnB,6BAAiB,CAAA;IACjB,2BAAe,CAAA;IACf,mCAAuB,CAAA;IACvB,+BAAmB,CAAA;AACrB,CAAC,EARW,QAAQ,KAAR,QAAQ,QAQnB;AAED,MAAM,CAAN,IAAY,kBAuCX;AAvCD,WAAY,kBAAkB;IAC5B,oDAA8B,CAAA;IAC9B,qDAA+B,CAAA;IAC/B,8CAAwB,CAAA;IACxB,+CAA+C;IAC/C,qCAAqC;IACrC,wDAAwD;IACxD,wFAAwF;IACxF,+BAA+B;IAC/B,oFAAoF;IACpF,iEAAiE;IACjE,8CAAwB,CAAA;IACxB,yEAAyE;IACzE,+EAA+E;IAC/E,8DAA8D;IAC9D,sDAAgC,CAAA;IAChC,wEAAwE;IACxE,iFAAiF;IACjF,yBAAyB;IACzB,sFAAsF;IACtF,uEAAuE;IACvE,4EAA4E;IAC5E,uFAAuF;IACvF,wDAAkC,CAAA;IAClC,+EAA+E;IAC/E,8CAA8C;IAC9C,oFAAoF;IACpF,0CAA0C;IAC1C,mFAAm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CAAC,MAAM,cAAc,GAAG,WAAW,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAA;AAEjE,MAAM,CAAC,MAAM,QAAQ,GAAG,SAAS,CAAA;AACjC,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAM,CAAA"}
@@ -1,2 +1,2 @@
1
- export * from './profile.js';
1
+ export * from './schemas.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,2 @@
1
- export * from './profile.js';
1
+ export * from './schemas.js';
2
2
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
1
  import type { JSONSchemaType } from 'ajv';
2
2
  import type { Profile } from '../types.js';
3
3
  export declare const ProfileSchema: JSONSchemaType<Profile>;
4
- //# sourceMappingURL=profile.d.ts.map
4
+ //# sourceMappingURL=schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/entity/schemas.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAA;AACzC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAI1C,eAAO,MAAM,aAAa,EAAE,cAAc,CAAC,OAAO,CAiBjD,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import { EntitySlugValueSchema, IdValueSchema } from '../consts.js';
2
- import { PermissionSetSchema, AttributeSetSchema } from '../permission/model.js';
2
+ import { PermissionSetSchema, AttributeSetSchema } from '../permission/schemas.js';
3
3
  export const ProfileSchema = {
4
4
  type: 'object',
5
5
  properties: {
@@ -18,4 +18,4 @@ export const ProfileSchema = {
18
18
  required: ['id', 'name', 'scopes'],
19
19
  additionalProperties: false,
20
20
  };
21
- //# sourceMappingURL=profile.js.map
21
+ //# sourceMappingURL=schemas.js.map