@owlmeans/auth 0.1.18-rc.9 → 0.1.19-rc.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.
- package/README.md +289 -45
- package/agent-meta/manifest.json +3 -3
- package/agent-meta/skills/auth/SKILL.md +29 -23
- package/agent-meta/skills/auth-protocol/SKILL.md +111 -91
- package/build/allowance/index.d.ts +1 -1
- package/build/allowance/index.d.ts.map +1 -1
- package/build/allowance/index.js +1 -1
- package/build/allowance/index.js.map +1 -1
- package/build/allowance/{model.d.ts → schemas.d.ts} +1 -1
- package/build/allowance/schemas.d.ts.map +1 -0
- package/build/allowance/{model.js → schemas.js} +5 -3
- package/build/allowance/schemas.js.map +1 -0
- package/build/auth/index.d.ts +1 -1
- package/build/auth/index.d.ts.map +1 -1
- package/build/auth/index.js +1 -1
- package/build/auth/index.js.map +1 -1
- package/build/auth/{model.d.ts → schemas.d.ts} +1 -1
- package/build/auth/schemas.d.ts.map +1 -0
- package/build/auth/{model.js → schemas.js} +2 -2
- package/build/auth/schemas.js.map +1 -0
- package/build/consts.d.ts +5 -0
- package/build/consts.d.ts.map +1 -1
- package/build/consts.js +5 -0
- package/build/consts.js.map +1 -1
- package/build/entity/index.d.ts +1 -1
- package/build/entity/index.js +1 -1
- package/build/entity/{profile.d.ts → schemas.d.ts} +1 -1
- package/build/entity/schemas.d.ts.map +1 -0
- package/build/entity/{profile.js → schemas.js} +2 -2
- package/build/entity/{profile.js.map → schemas.js.map} +1 -1
- package/build/errors.d.ts +15 -0
- package/build/errors.d.ts.map +1 -1
- package/build/errors.js +19 -0
- package/build/errors.js.map +1 -1
- package/build/helper/types.d.ts +22 -0
- package/build/helper/types.d.ts.map +1 -0
- package/build/helper/types.js +2 -0
- package/build/helper/types.js.map +1 -0
- package/build/helper.d.ts +7 -11
- package/build/helper.d.ts.map +1 -1
- package/build/helper.js +30 -27
- package/build/helper.js.map +1 -1
- package/build/index.d.ts +1 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js.map +1 -1
- package/build/permission/index.d.ts +1 -1
- package/build/permission/index.d.ts.map +1 -1
- package/build/permission/index.js +1 -1
- package/build/permission/index.js.map +1 -1
- package/build/permission/{model.d.ts → schemas.d.ts} +1 -1
- package/build/permission/schemas.d.ts.map +1 -0
- package/build/permission/{model.js → schemas.js} +1 -1
- package/build/permission/schemas.js.map +1 -0
- package/build/rely/index.d.ts +1 -1
- package/build/rely/index.d.ts.map +1 -1
- package/build/rely/index.js +1 -1
- package/build/rely/index.js.map +1 -1
- package/build/rely/{model.d.ts → schemas.d.ts} +1 -1
- package/build/rely/schemas.d.ts.map +1 -0
- package/build/rely/{model.js → schemas.js} +1 -1
- package/build/rely/schemas.js.map +1 -0
- package/build/supervisor.d.ts +0 -8
- package/build/supervisor.d.ts.map +1 -1
- package/build/types.d.ts +12 -0
- package/build/types.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/allowance/index.ts +1 -1
- package/src/allowance/{model.ts → schemas.ts} +4 -2
- package/src/auth/index.ts +1 -1
- package/src/auth/{model.ts → schemas.ts} +1 -1
- package/src/consts.ts +6 -0
- package/src/entity/index.ts +1 -1
- package/src/entity/{profile.ts → schemas.ts} +1 -1
- package/src/errors.ts +22 -1
- package/src/helper/types.ts +22 -0
- package/src/helper.ts +44 -33
- package/src/index.ts +1 -0
- package/src/permission/index.ts +1 -1
- package/src/rely/index.ts +1 -1
- package/src/supervisor.ts +0 -8
- package/src/types.ts +13 -0
- package/tests/errors.spec.ts +19 -0
- package/build/allowance/model.d.ts.map +0 -1
- package/build/allowance/model.js.map +0 -1
- package/build/auth/model.d.ts.map +0 -1
- package/build/auth/model.js.map +0 -1
- package/build/entity/profile.d.ts.map +0 -1
- package/build/permission/model.d.ts.map +0 -1
- package/build/permission/model.js.map +0 -1
- package/build/rely/model.d.ts.map +0 -1
- package/build/rely/model.js.map +0 -1
- /package/src/permission/{model.ts → schemas.ts} +0 -0
- /package/src/rely/{model.ts → schemas.ts} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: auth-protocol
|
|
3
|
-
description: Comprehensive reference for the OwlMeans authentication and authorization protocol — the Ed25519, OIDC, provider-backed local identity, email-OTP and PK-supervisor paths, the core types and error hierarchy, guards and gates, the trust resource, the envelope shape, organization-entity resolution, the refresh flow, and the mocking points. Auto-invoked when files under auth*, *oidc*, server-auth-identity, did*, wled or client-payment are touched.
|
|
3
|
+
description: Comprehensive reference for the OwlMeans authentication and authorization protocol — the Ed25519, OIDC, provider-backed local identity, email-OTP, hosted-app (integrated provider) and PK-supervisor paths, the identity model (one account per e-mail, credentials on the account, profile rows per app and organization, organizations with groups), pairwise subjects, the acting organization as session state and its switch, the four permission kinds, the core types and error hierarchy, guards and gates, the trust resource, the envelope shape, organization-entity resolution, the refresh flow, and the mocking points. Auto-invoked when files under auth*, *oidc*, *iam*, server-auth-identity, did*, wled or client-payment are touched.
|
|
4
4
|
---
|
|
5
5
|
<!-- AUTO-GENERATED — do not edit. Regenerate via sync-agent-meta. -->
|
|
6
6
|
|
|
@@ -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>`.
|
|
@@ -30,19 +30,19 @@ Use case: service-to-service, wallet provider, backend clients, high-security br
|
|
|
30
30
|
Use case: browser clients, third-party IdP integration, multi-tenant SaaS.
|
|
31
31
|
|
|
32
32
|
1. Standard OAuth2 authorization-code flow. The relying party redirects to the provider and the return leg exchanges the code: `makeOidcClientService` (`@owlmeans/server-oidc-rp`) replays the stored PKCE verifier and grants the token set.
|
|
33
|
-
2. Server decodes the ID token
|
|
33
|
+
2. Server decodes the ID token — only the id_token; an access token's format is provider-private — builds an `Auth` from its claims, and wraps it in an envelope of type `oidc-wrapped-token` signed with the service key — the bearer is `OIDC-WRAPPED-TOKEN <encoded>`. The token set and, for a tenanted client, the organizations stay in the server-side session record ("Organizations and the session").
|
|
34
34
|
3. Subsequent requests are matched and handled by `makeOidcGuard` (`@owlmeans/oidc`), which verifies the envelope signature against the service key and delegates freshness to the `WRAPPED_OIDC` service.
|
|
35
|
-
4. Refresh: `makeOidcWrappingService` (`@owlmeans/server-oidc-rp`) re-validates the stored token set — introspection, or a refresh grant once `expires_at` has passed — and re-signs the wrapped token. When the value changes, the guard returns it in the **`TOKEN_UPDATE` response header** (`'auth-token-refresh'`, `@owlmeans/auth-common`); an empty value means the session is over. It is a header, not a route: `@owlmeans/server-api` lists it in `exposedHeaders` and `@owlmeans/api`'s client service feeds it back into `AuthService.update()`. Where the deployment has a separate auth manager, the wrapper reaches it over the `external-auth:auth:update`
|
|
35
|
+
4. Refresh: `makeOidcWrappingService` (`@owlmeans/server-oidc-rp`) re-validates the stored token set — introspection, or a refresh grant once `expires_at` has passed; current userinfo on every request under `sessionValidation: 'required'` — and re-signs the wrapped token. When the value changes, the guard returns it in the **`TOKEN_UPDATE` response header** (`'auth-token-refresh'`, `@owlmeans/auth-common`); an empty value means the session is over. It is a header, not a route: `@owlmeans/server-api` lists it in `exposedHeaders` and `@owlmeans/api`'s client service feeds it back into `AuthService.update()`. Where the deployment has a separate auth manager, the wrapper reaches it over the `external-auth:auth:update` declaration from `makeAuthServiceEntrypoints`, bound at `/<prefix>/auth/update`.
|
|
36
36
|
|
|
37
|
-
### Provider-
|
|
37
|
+
### Provider-backed local identity
|
|
38
38
|
|
|
39
|
-
Use case:
|
|
39
|
+
Use case: a deployment that signs its own people in through Google, OIDC or an e-mail code and authorizes against its own identity store (`@owlmeans/server-auth-identity`).
|
|
40
40
|
|
|
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
|
-
3. Server exchanges the provider code through `@owlmeans/server-oidc-rp`
|
|
44
|
-
4.
|
|
45
|
-
5. Server returns a normal OwlMeans bearer token carrying the organization's `entitySlug`. Downstream product gates authorize against
|
|
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 `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
|
+
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
|
|
48
48
|
|
|
@@ -50,7 +50,19 @@ Use case: passwordless sign-in where no external IdP is wanted.
|
|
|
50
50
|
|
|
51
51
|
1. Client posts `{ type: 'email-otp', userId: <email> }` to `/authentication/init`.
|
|
52
52
|
2. `@owlmeans/server-auth-otp` mails a six-digit code, stores it in Redis under a TTL, and answers with a challenge of `"<email>::<nonce>"` — the nonce is what keeps two independent attempts for one address from colliding in the manager's anti-replay cache.
|
|
53
|
-
3. Client posts the code as `AuthCredentials.credential`; the plugin verifies and consumes it, resolves the identity through `AUTH_IDENTITY_LINKING
|
|
53
|
+
3. Client posts the code as `AuthCredentials.credential`; the plugin verifies and consumes it, resolves the identity through the linking service `cfg.otp.identityAlias` names (default `AUTH_IDENTITY_LINKING`), and the manager signs the credential envelope as usual. An integrated provider's end-user login names the e-mail proof linking service there instead (next path).
|
|
54
|
+
|
|
55
|
+
### Hosted-app sign-in through the integrated provider
|
|
56
|
+
|
|
57
|
+
Use case: an application a deployment hosts (a generated target) signs its end users in against the deployment's own OIDC provider (`@owlmeans/server-oidc-provider` with `@owlmeans/iam-integrated`), over the same identity store.
|
|
58
|
+
|
|
59
|
+
1. The application's server relying party (`appendIam` of `@owlmeans/server-iam`) sends the browser to the provider with the base scopes plus `permissions` (and `organizations` for a tenanted client); a provisioned client's allowlist is a superset of everything a relying party asks for.
|
|
60
|
+
2. The provider's login screen runs the e-mail code against the deployment's auth manager with the e-mail proof linking service (`makeEmailProofLinkingService`). Its payload proves the address and identifies nobody: `profileId: IAM_EMAIL_PROOF` (`'proof:email'`), `userId` = the address, one narrow end-user scope, no `entitySlug` — and it writes nothing.
|
|
61
|
+
3. The provider's interaction finalizer verifies that proof, loads the interaction's client and calls `subjects.signIn(clientId, { email })`: the account (one per address; the e-mail code a credential on it), its primary row of the app as owner of the personal organization, and — for staff of the client's owning organization — the staff row there. The provider grant and session name the ACCOUNT id.
|
|
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
|
+
5. The claims: `sub` = the pairwise subject, `email`, `permissions`, and `organizations` under its scope. The account's record id never leaves the provider.
|
|
64
|
+
|
|
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".
|
|
54
66
|
|
|
55
67
|
### PK supervisor (development only)
|
|
56
68
|
|
|
@@ -62,56 +74,67 @@ Use case: deterministic end-to-end tests, and operator access to a development o
|
|
|
62
74
|
|
|
63
75
|
Never enabled in real production — see the `supervisor-auth` skill.
|
|
64
76
|
|
|
65
|
-
##
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
-
|
|
72
|
-
-
|
|
73
|
-
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
- `
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
77
|
+
## The identity model
|
|
78
|
+
|
|
79
|
+
One store (`@owlmeans/server-auth-identity`) serves a deployment's own app and every app it hosts.
|
|
80
|
+
Its records, fields, indexes, races and events are governed by the `server-auth-identity` skill;
|
|
81
|
+
the protocol relies on these rules:
|
|
82
|
+
|
|
83
|
+
- **Account** — the person, ONE per e-mail; `entityId` = its personal organization. Every sign-in
|
|
84
|
+
method (e-mail code, Google, PK supervisor) is a **credential** on the account, never on a row.
|
|
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 = 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
|
+
- **Organization** (`OrgEntity`) — `slug` (the wire `entitySlug`, renameable), `iamKey` (frozen,
|
|
90
|
+
claimed as `entityKey`, server-side only) and the organization's **groups** inside the document.
|
|
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 `identityOf(ctx).ensureAccount` must have
|
|
93
|
+
verified it.
|
|
94
|
+
|
|
95
|
+
## Organizations and the session
|
|
96
|
+
|
|
97
|
+
Tenancy is a property of the hosted app's client (`IamClientConfig.users` / `.operators`,
|
|
98
|
+
`iam` skill): with neither flag every subject acts in the client's owning organization; with either,
|
|
99
|
+
the client asks for `ORGANIZATIONS_SCOPE` and each subject acts in organizations of its own.
|
|
100
|
+
|
|
101
|
+
- **The acting organization is session state of the relying party**, never a request parameter.
|
|
102
|
+
The exchange picks it, every validation re-picks it by `entityKey`, and only the switch moves it —
|
|
103
|
+
governed by `server-oidc-rp` → "Organizations" (claims, session record, browser-token contents,
|
|
104
|
+
the switch handlers).
|
|
105
|
+
- **The request entity** on such a relying party is `{ id: entityKey, slug, iamKey: entityKey }`,
|
|
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`.
|
|
113
|
+
|
|
114
|
+
## Permission kinds
|
|
115
|
+
|
|
116
|
+
What a grant binds to — nothing, an organization (`entityScoped`), resource ids (`resourceScoped`) or
|
|
117
|
+
both — is a property of its DEFINITION, and `defaultClass` (`none` / `user` / `member` / `owner`)
|
|
118
|
+
says who holds it without a grant. `hasPermission(auth, name, { scope?, resourceId?, entitySlug? })`
|
|
119
|
+
is fail-closed on a bound set. The model is governed by the `iam` skill ("Permission kinds",
|
|
120
|
+
"Default classes"); the gate that asserts it by `server-iam` ("How the gate decides").
|
|
121
|
+
|
|
122
|
+
## Types, constants and errors
|
|
123
|
+
|
|
124
|
+
The payload chain is `Authorization` (`entitySlug?`, `scopes`, `permissions?`, …) → `ProfilePayload`
|
|
125
|
+
(+ `groups?`) → `AuthPayload` (+ `type`, `role`, `userId`, `profileId?`, …) → `AuthCredentials`
|
|
126
|
+
(+ `challenge`, `credential`) for authentication and `Auth` (+ `token`, `isUser`, `createdAt`) for a
|
|
127
|
+
resolved identity. **`entitySlug` is the only organization-entity value on the wire**; read it with
|
|
128
|
+
`authHelper.entitySlugOf(payload)`, never off the field. Where each name is governed:
|
|
129
|
+
|
|
130
|
+
- types, `AuthRole` (a **string** enum), `AuthenticationType`, query/header constants, the error
|
|
131
|
+
hierarchy (`AuthError` root; `AuthUnknown` 400, `AuthorizationError` → `AuthForbidden`,
|
|
132
|
+
`AuthenFailed` …) — the `auth` skill;
|
|
133
|
+
- guard aliases (`DEFAULT_GUARD`, `GUARD_ED25519`), `TOKEN_UPDATE`, reserved paths, `ENTITY_RESOLVER`
|
|
134
|
+
— the `auth-common` skill;
|
|
135
|
+
- `OIDC_GATE`, the Google plugin/service names, the `permissions` / `organizations` scopes and their
|
|
136
|
+
refusal reasons, `IAM_API_METADATA` — the `oidc` skill. An app that uses a provider only to sign in
|
|
137
|
+
and authorizes against local identity declares its own gate alias (`server-oidc-rp` → Rules).
|
|
115
138
|
|
|
116
139
|
## Guard interface
|
|
117
140
|
|
|
@@ -142,10 +165,10 @@ import { TRUSTED } from '@owlmeans/config'
|
|
|
142
165
|
const { user, key } = await trust(context, TRUSTED, context.cfg.alias ?? context.cfg.service)
|
|
143
166
|
```
|
|
144
167
|
|
|
145
|
-
It loads the record by `name` (
|
|
146
|
-
`
|
|
147
|
-
|
|
148
|
-
|
|
168
|
+
It loads the record by `name` (a fourth argument matches another field), throws `SyntaxError` when
|
|
169
|
+
there is none, and answers a signing key pair when the `TrustedRecord` carries a `secret`, a
|
|
170
|
+
verify-only one otherwise. The `TRUSTED` config resource is the source of truth for known signing
|
|
171
|
+
identities — the auth service, peer services, wallet providers, supervisors (`auth-common`).
|
|
149
172
|
|
|
150
173
|
## Envelope shape
|
|
151
174
|
|
|
@@ -165,38 +188,30 @@ It loads the record by `name` (pass a fourth argument to match on another field)
|
|
|
165
188
|
|
|
166
189
|
## Key model
|
|
167
190
|
|
|
168
|
-
`KeyPairModel` (`@owlmeans/basic-keys`)
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
sign: (data) => Promise<string>
|
|
173
|
-
verify: (data, signature) => Promise<boolean>
|
|
174
|
-
export: () => string // private, "ed25519:<base64>"
|
|
175
|
-
exportPublic: () => string // public, "ed25519:<base64>"
|
|
176
|
-
exportAddress: () => string
|
|
177
|
-
encrypt / decrypt / dcrpt
|
|
178
|
-
}
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
`makeKeyPairModel(input?)` (`@owlmeans/basic-keys`) accepts a `KeyPair`, an `ed25519:<base64>` string, or `undefined` for random. `fromPubKey(credential)` builds a public-only model. `packAuthCredentials(auth, extra, signer)` signs an `AuthCredentials` for the Ed25519 path.
|
|
191
|
+
`KeyPairModel` (`@owlmeans/basic-keys`, `basic-keys` skill) signs, verifies and exports
|
|
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.
|
|
182
195
|
|
|
183
196
|
## Setup wiring
|
|
184
197
|
|
|
185
198
|
Server-side:
|
|
186
199
|
- `makeAuthService(alias?)` / `appendAuthService(ctx, alias?)` (`@owlmeans/server-auth`) — the bearer guard.
|
|
187
|
-
- `
|
|
188
|
-
- `makeOidcWrappingService`, `makeOidcGate`, `makeOidcClientService`, `appendOidcGuard`, `
|
|
200
|
+
- `makeAuthServiceEntrypoints(serviceAlias, prefix = 'oidc-api')` (`@owlmeans/server-oidc-rp`) — returns `external-auth:provider:list` and `external-auth:auth:update` declarations, both behind `GUARD_ED25519`; bind them in the serving app.
|
|
201
|
+
- `makeOidcWrappingService`, `makeOidcGate`, `makeOidcClientService`, `appendOidcGuard`, `oidcEntrypoints` — wire OIDC services and server-local bindings into a server context (`@owlmeans/server-oidc-rp`). Decorate the app protocol tree with `withOidcGuard` from `@owlmeans/oidc` before binding it.
|
|
202
|
+
- `appendIam(context)` (`@owlmeans/server-iam`) — the same four registrations with the IAM gate in place of `makeOidcGate()`, for an application signing in against an IAM provider.
|
|
189
203
|
|
|
190
204
|
Client-side:
|
|
191
205
|
- `appendAuthService(ctx, alias?)` (`@owlmeans/client-auth`) — the client auth service with persistent storage.
|
|
192
206
|
- `setupExternalAuthentication(service)` (`@owlmeans/client-auth`) — point `CAUTHEN_FLOW_ENTER` at the service an external provider redirects into.
|
|
193
207
|
- `appendLogin(ctx)` (`@owlmeans/client-auth/login`) — the login-plugin host; `@owlmeans/web-client`'s `makeContext` already calls it.
|
|
194
|
-
- `appendOidcGuard()`, `
|
|
208
|
+
- `appendOidcGuard()`, `oidcEntrypoints()` — `@owlmeans/web-oidc-rp` for browser-side bindings; `withOidcGuard` decorates the shared protocol tree.
|
|
209
|
+
- `appendIam(context, opts?)`, `withIamGuard`, `iamEntrypoints()` (`@owlmeans/client-iam`) — the same in one import, plus the consent-before-sign-in precondition and the organization switch.
|
|
195
210
|
|
|
196
211
|
Local identity and the organization entity:
|
|
197
|
-
- `appendAuthIdentityResources(context)` (`@owlmeans/server-auth-identity`) — registers the org-entity registry, the account/profile/credentials resources, the linking service
|
|
198
|
-
- `AUTH_IDENTITY_LINKING` — the service that maps provider profile details onto an `AuthPayload
|
|
199
|
-
- `AUTH_IDENTITY_PROFILE` — the
|
|
212
|
+
- `appendAuthIdentityResources(context, dbAlias?, { service? })` (`@owlmeans/server-auth-identity`) — registers the org-entity registry, the account/profile/credentials resources, the linking service for the deployment's own app key `service`, the entity resolver and the identity-events seam.
|
|
213
|
+
- `AUTH_IDENTITY_LINKING` — the service that maps provider profile details onto an `AuthPayload` of the deployment's own app.
|
|
214
|
+
- `AUTH_IDENTITY_PROFILE` — the profile rows: one per (account, app, organization), the record authorization reads (`role`, `scopes`, `permissions`, `groups`, optional expiry).
|
|
200
215
|
- `ENTITY_RESOLVER` — turns the token's `entitySlug` (current, retired, or the frozen `iamKey`) into a stable `OrgEntityRef`. Registering it is what tells the boundary this deployment has organizations.
|
|
201
216
|
|
|
202
217
|
Read identity records with `load()` or `list()`. Never use `take()` in an authorization lookup — it is delete-and-return, so it consumes the record it answers with.
|
|
@@ -209,13 +224,18 @@ Two places resolve the organization entity, and both are required:
|
|
|
209
224
|
`credential.entitySlug` is resolved and rewritten to the current one, so a token is canonical for
|
|
210
225
|
as long as it lives. An unresolvable value throws `AuthenFailed('entity')`.
|
|
211
226
|
2. **At every server boundary that establishes authentication** — the HTTP boundary, and any socket
|
|
212
|
-
that authenticates after its connection is open — via
|
|
213
|
-
(`@owlmeans/auth-common`), which sets
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
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.
|
|
230
|
+
|
|
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.
|
|
235
|
+
|
|
236
|
+
A relying party of a tenanted client has no registry to resolve from: there the OIDC guard attaches
|
|
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").
|
|
219
239
|
|
|
220
240
|
## Mocking points (for category-B tests)
|
|
221
241
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './
|
|
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,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/allowance/index.ts"],"names":[],"mappings":"AACA,cAAc,cAAc,CAAA"}
|
package/build/allowance/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './
|
|
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,
|
|
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=
|
|
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/
|
|
3
|
-
import { AttributeSetSchema, PermissionSetSchema } from '../permission/
|
|
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: {
|
|
@@ -49,6 +49,8 @@ export const AuthSchema = {
|
|
|
49
49
|
token: { type: 'string', minLength: 32, maxLength: 1024 },
|
|
50
50
|
isUser: { type: 'boolean' },
|
|
51
51
|
createdAt: DateSchema,
|
|
52
|
+
sessionId: { type: 'string', minLength: 16, maxLength: 128, nullable: true },
|
|
53
|
+
authorizationVersion: { type: 'integer', minimum: 1, nullable: true },
|
|
52
54
|
expiresAt: { ...DateSchema, nullable: true },
|
|
53
55
|
...AuthPayloadSchema.properties,
|
|
54
56
|
},
|
|
@@ -57,4 +59,4 @@ export const AuthSchema = {
|
|
|
57
59
|
],
|
|
58
60
|
additionalProperties: false,
|
|
59
61
|
};
|
|
60
|
-
//# sourceMappingURL=
|
|
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,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AG,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC5E,oBAAoB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;QACrE,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"}
|
package/build/auth/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './
|
|
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,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AACA,cAAc,cAAc,CAAA"}
|
package/build/auth/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './schemas.js';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/build/auth/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AACA,cAAc,
|
|
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=
|
|
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/
|
|
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=
|
|
55
|
+
//# sourceMappingURL=schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"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PTCHA = "_external:re-captcha";
|
|
78
78
|
export declare const CMOD_RECAPTCHA: string;
|
|
79
|
+
/**
|
|
80
|
+
* The guard of a route a reCAPTCHA-proven guest may call once: `Authorization: RE-CAPTCHA <token>`,
|
|
81
|
+
* the token the auth manager's reCAPTCHA plugin issued (`makeReCaptchaGuard` in server-auth).
|
|
82
|
+
*/
|
|
83
|
+
export declare const RECAPTCHA_GUARD = "guard:re-captcha";
|
|
79
84
|
export declare const GUEST_ID = "__guest";
|
|
80
85
|
export declare const RELY_3RD = "rely";
|
|
81
86
|
//# sourceMappingURL=consts.d.ts.map
|
package/build/consts.d.ts.map
CHANGED
|
@@ -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,SAAS,MAAM,CAAA;AAE5B,eAAO,MAAM,UAAU,MAAM,CAAA;AAC7B,eAAO,MAAM,UAAU,WAAW,CAAA;AAElC,oBAAY,QAAQ;IAClB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,SAAS,cAAc;IACvB,OAAO,YAAY;CACpB;AAED,oBAAY,kBAAkB;IAC5B,YAAY,kBAAkB;IAC9B,YAAY,mBAAmB;IAC/B,SAAS,eAAe;IAQxB,SAAS,eAAe;IAIxB,aAAa,mBAAmB;IAQhC,cAAc,oBAAoB;IAOlC,cAAc,oBAAoB;IAGlC,MAAM,iBAAiB;IAKvB,UAAU,kBAAkB;CAC7B;AAED,oBAAY,iBAAiB;IAE3B,SAAS,eAAe;IAGxB,iBAAiB,wBAAwB;IAGzC,qBAAqB,4BAA4B;CAClD;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AA8E,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;;;GAGG;AACH,eAAO,MAAM,eAAe,qBAAqB,CAAA;AAEjD,eAAO,MAAM,QAAQ,YAAY,CAAA;AACjC,eAAO,MAAM,QAAQ,SAAS,CAAA"}
|
package/build/consts.js
CHANGED
|
@@ -113,6 +113,11 @@ export const ENTITY_QUERY = 'entitySlug';
|
|
|
113
113
|
export const PROFILE_QUERY = 'profile';
|
|
114
114
|
export const MOD_RECAPTCHA = '_external:re-captcha';
|
|
115
115
|
export const CMOD_RECAPTCHA = `_client-${MOD_RECAPTCHA.slice(1)}`;
|
|
116
|
+
/**
|
|
117
|
+
* The guard of a route a reCAPTCHA-proven guest may call once: `Authorization: RE-CAPTCHA <token>`,
|
|
118
|
+
* the token the auth manager's reCAPTCHA plugin issued (`makeReCaptchaGuard` in server-auth).
|
|
119
|
+
*/
|
|
120
|
+
export const RECAPTCHA_GUARD = 'guard:re-captcha';
|
|
116
121
|
export const GUEST_ID = '__guest';
|
|
117
122
|
export const RELY_3RD = 'rely';
|
|
118
123
|
//# sourceMappingURL=consts.js.map
|
package/build/consts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consts.js","sourceRoot":"","sources":["../src/consts.ts"],"names":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ACH,MAAM,CAAC,MAAM,eAAe,GAAG,kBAAkB,CAAA;AAEjD,MAAM,CAAC,MAAM,QAAQ,GAAG,SAAS,CAAA;AACjC,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAM,CAAA"}
|
package/build/entity/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './schemas.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/build/entity/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './schemas.js';
|
|
2
2
|
//# sourceMappingURL=index.js.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/
|
|
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=
|
|
21
|
+
//# sourceMappingURL=schemas.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"
|
|
1
|
+
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../src/entity/schemas.ts"],"names":[],"mappings":"AAGA,OA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.ts
CHANGED
|
@@ -3,14 +3,29 @@ export declare class AuthError extends ResilientError {
|
|
|
3
3
|
static typeName: string;
|
|
4
4
|
constructor(message?: string);
|
|
5
5
|
}
|
|
6
|
+
/**
|
|
7
|
+
* The request names an authentication method, provider or identity this server does not know — an
|
|
8
|
+
* unregistered plugin type, a sign-in method a gate refuses, a request carrying no organization.
|
|
9
|
+
* That is the caller's request, not a crashed server, so it answers 400 (`httpStatus`, read by
|
|
10
|
+
* `@owlmeans/server-api`). It is outside the authorization family on purpose: a failed credential
|
|
11
|
+
* stays 401 (`AuthorizationError`) and a refused permission 403 (`AuthForbidden`).
|
|
12
|
+
*/
|
|
6
13
|
export declare class AuthUnknown extends AuthError {
|
|
7
14
|
static typeName: string;
|
|
15
|
+
static httpStatus: number;
|
|
8
16
|
constructor(message?: string);
|
|
9
17
|
}
|
|
10
18
|
export declare class AuthManagerError extends AuthError {
|
|
11
19
|
static typeName: string;
|
|
12
20
|
constructor(message?: string);
|
|
13
21
|
}
|
|
22
|
+
/** An authentication authority could not be consulted, so access must fail closed. */
|
|
23
|
+
export declare class AuthUnavailable extends AuthError {
|
|
24
|
+
static typeName: string;
|
|
25
|
+
static httpStatus: number;
|
|
26
|
+
static allowServerErrorStatus: boolean;
|
|
27
|
+
constructor(message?: string);
|
|
28
|
+
}
|
|
14
29
|
export declare class AuthManagerUnsupported extends AuthManagerError {
|
|
15
30
|
static typeName: string;
|
|
16
31
|
constructor(message?: string);
|
package/build/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAEhD,qBAAa,SAAU,SAAQ,cAAc;IAC3C,OAAuB,QAAQ,EAAE,MAAM,CAAc;IAErD,YAAY,OAAO,GAAE,MAAgB,EAEpC;CACF;AAED,qBAAa,WAAY,SAAQ,SAAS;IACxC,OAAuB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