@softistx/janus 0.77.0 → 0.79.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 +42 -15
- package/dist/auth/api-keys/authenticate-key.d.ts +3 -2
- package/dist/auth/api-keys/authenticate-key.d.ts.map +1 -1
- package/dist/auth/api-keys/count.d.ts.map +1 -1
- package/dist/auth/api-keys/create/after-insert.d.ts +11 -0
- package/dist/auth/api-keys/create/after-insert.d.ts.map +1 -0
- package/dist/auth/api-keys/create/checks.d.ts +17 -0
- package/dist/auth/api-keys/create/checks.d.ts.map +1 -1
- package/dist/auth/api-keys/create/index.d.ts.map +1 -1
- package/dist/auth/api-keys/create/service-checks.d.ts +25 -0
- package/dist/auth/api-keys/create/service-checks.d.ts.map +1 -0
- package/dist/auth/api-keys/create/service.d.ts +12 -0
- package/dist/auth/api-keys/create/service.d.ts.map +1 -0
- package/dist/auth/api-keys/expiry.d.ts.map +1 -1
- package/dist/auth/api-keys/flows.d.ts +6 -2
- package/dist/auth/api-keys/flows.d.ts.map +1 -1
- package/dist/auth/api-keys/owned.d.ts +12 -0
- package/dist/auth/api-keys/owned.d.ts.map +1 -0
- package/dist/auth/api-keys/read.d.ts.map +1 -1
- package/dist/auth/api-keys/service-flows.d.ts +13 -0
- package/dist/auth/api-keys/service-flows.d.ts.map +1 -0
- package/dist/auth/api-keys/to-api-key.d.ts.map +1 -1
- package/dist/auth/config/api-keys-config.d.ts +29 -2
- package/dist/auth/config/api-keys-config.d.ts.map +1 -1
- package/dist/auth/config/index.d.ts +2 -2
- package/dist/auth/config/index.d.ts.map +1 -1
- package/dist/auth/config/resolve-api-keys.d.ts.map +1 -1
- package/dist/auth/config/resolve-social.d.ts +1 -1
- package/dist/auth/config/resolve-social.d.ts.map +1 -1
- package/dist/auth/config/resolved-config.d.ts +11 -1
- package/dist/auth/config/resolved-config.d.ts.map +1 -1
- package/dist/auth/config/social-config.d.ts +31 -0
- package/dist/auth/config/social-config.d.ts.map +1 -1
- package/dist/auth/events.d.ts +3 -2
- package/dist/auth/events.d.ts.map +1 -1
- package/dist/auth/first-proof.d.ts +10 -2
- package/dist/auth/first-proof.d.ts.map +1 -1
- package/dist/auth/index.d.ts +3 -2
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/port/memory/api-keys/capabilities.d.ts.map +1 -1
- package/dist/auth/port/memory/api-keys/index.d.ts.map +1 -1
- package/dist/auth/port/types/api-keys.d.ts +25 -5
- package/dist/auth/port/types/api-keys.d.ts.map +1 -1
- package/dist/auth/sessions/authenticate.d.ts +3 -2
- package/dist/auth/sessions/authenticate.d.ts.map +1 -1
- package/dist/auth/sessions/fresh.d.ts +2 -2
- package/dist/auth/sessions/fresh.d.ts.map +1 -1
- package/dist/auth/sessions/shared-api.d.ts +3 -2
- package/dist/auth/sessions/shared-api.d.ts.map +1 -1
- package/dist/auth/shared-api.d.ts +11 -3
- package/dist/auth/shared-api.d.ts.map +1 -1
- package/dist/auth/signed-token.d.ts +41 -0
- package/dist/auth/signed-token.d.ts.map +1 -0
- package/dist/auth/social/complete-link.d.ts +9 -1
- package/dist/auth/social/complete-link.d.ts.map +1 -1
- package/dist/auth/social/complete.d.ts +1 -0
- package/dist/auth/social/complete.d.ts.map +1 -1
- package/dist/auth/social/finish.d.ts +3 -0
- package/dist/auth/social/finish.d.ts.map +1 -1
- package/dist/auth/social/link-holder.d.ts +10 -1
- package/dist/auth/social/link-holder.d.ts.map +1 -1
- package/dist/auth/social/redeem.d.ts +2 -0
- package/dist/auth/social/redeem.d.ts.map +1 -1
- package/dist/auth/social/replace-holder.d.ts +37 -0
- package/dist/auth/social/replace-holder.d.ts.map +1 -0
- package/dist/auth/social/sign-in.d.ts +4 -1
- package/dist/auth/social/sign-in.d.ts.map +1 -1
- package/dist/auth/social/sign-up.d.ts +1 -0
- package/dist/auth/social/sign-up.d.ts.map +1 -1
- package/dist/auth/types/api-keys-of.d.ts +6 -1
- package/dist/auth/types/api-keys-of.d.ts.map +1 -1
- package/dist/auth/types/api-keys.d.ts +18 -6
- package/dist/auth/types/api-keys.d.ts.map +1 -1
- package/dist/auth/types/checks.d.ts +17 -1
- package/dist/auth/types/checks.d.ts.map +1 -1
- package/dist/auth/types/index.d.ts +3 -2
- package/dist/auth/types/index.d.ts.map +1 -1
- package/dist/auth/types/service-keys.d.ts +58 -0
- package/dist/auth/types/service-keys.d.ts.map +1 -0
- package/dist/auth/types/session.d.ts +21 -2
- package/dist/auth/types/session.d.ts.map +1 -1
- package/dist/auth/types/shared-api.d.ts +15 -1
- package/dist/auth/types/shared-api.d.ts.map +1 -1
- package/dist/auth/types/social.d.ts +4 -1
- package/dist/auth/types/social.d.ts.map +1 -1
- package/dist/chunks/{index-7h34nqrm.js → index-5hcajrrx.js} +5 -5
- package/dist/chunks/{index-7h34nqrm.js.map → index-5hcajrrx.js.map} +4 -4
- package/dist/chunks/{index-n8jxmxeg.js → index-gzc472ar.js} +2 -2
- package/dist/chunks/{index-ftz0ne6j.js → index-r8fcessc.js} +2 -2
- package/dist/chunks/{index-2ttdcz7n.js → index-vx9a5cpy.js} +9 -3
- package/dist/chunks/{index-2ttdcz7n.js.map → index-vx9a5cpy.js.map} +4 -4
- package/dist/conformance/api-keys/cases/index.d.ts.map +1 -1
- package/dist/conformance/api-keys/cases/outage.d.ts.map +1 -1
- package/dist/conformance/api-keys/cases/service.d.ts +3 -0
- package/dist/conformance/api-keys/cases/service.d.ts.map +1 -0
- package/dist/conformance/index.js +407 -302
- package/dist/conformance/index.js.map +6 -5
- package/dist/errors/janus-error/codes.invitations.d.ts +6 -0
- package/dist/errors/janus-error/codes.invitations.d.ts.map +1 -1
- package/dist/errors/janus-error/index.d.ts +1 -1
- package/dist/errors/janus-error/index.d.ts.map +1 -1
- package/dist/errors/janus-error/options.d.ts +1 -1
- package/dist/errors/janus-error/options.d.ts.map +1 -1
- package/dist/errors/janus-error/refusals.d.ts +5 -0
- package/dist/errors/janus-error/refusals.d.ts.map +1 -1
- package/dist/errors/janus-error/status.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +517 -117
- package/dist/index.js.map +32 -25
- package/dist/permissions/index.js +3 -3
- package/docs/README.md +1 -0
- package/docs/guide/api-keys.md +78 -1
- package/docs/guide/email-flows.md +6 -1
- package/docs/guide/errors.md +4 -3
- package/docs/guide/events.md +7 -7
- package/docs/guide/magic-link.md +1 -1
- package/docs/guide/signed-tokens.md +46 -0
- package/docs/guide/social.md +102 -5
- package/docs/roadmap.md +3 -0
- package/docs/troubleshooting.md +33 -0
- package/package.json +1 -1
- /package/dist/chunks/{index-n8jxmxeg.js.map → index-gzc472ar.js.map} +0 -0
- /package/dist/chunks/{index-ftz0ne6j.js.map → index-r8fcessc.js.map} +0 -0
package/README.md
CHANGED
|
@@ -207,6 +207,7 @@ if (error instanceof JanusError) {
|
|
|
207
207
|
| `CURSOR_FILTER_MISMATCH` | 400 |
|
|
208
208
|
| `UNSUPPORTED` | 501 — a wiring mistake, and the message names the store to change |
|
|
209
209
|
| `PERMISSION_DEPTH` | 500 — a permission check or list walked past `maxDepth`; not a denial |
|
|
210
|
+
| `API_KEY_REFUSED` | 403 — `apiKeys.createService` was refused by `apiKeys.service.authorize` |
|
|
210
211
|
| `API_KEY_LIMIT` | 409 — the user holds `maxActive` API keys; `maxActive` belongs in the body, and they revoke one first |
|
|
211
212
|
| `API_KEY_INVALID` | 400 — a key's name, lifetime, scopes or bound object is refused; `field` says which |
|
|
212
213
|
| `INVITATION_INVALID` | 400 — a code that names no pending invitation (one code for unknown, malformed, accepted, revoked and lapsed, told apart by `reason`), or an invitation field that cannot be kept (`field`) |
|
|
@@ -218,7 +219,7 @@ if (error instanceof JanusError) {
|
|
|
218
219
|
| `PASSKEY_INVALID` | 400 — a passkey registration's response does not verify (`reason` is for your logs) or its name is refused (`field: 'name'`) |
|
|
219
220
|
| `PASSKEY_TAKEN` | 409 — the credential is already registered |
|
|
220
221
|
| `PASSKEY_LIMIT` | 409 — the user holds `passkeys.maxPerUser` passkeys; `maxActive` carries the cap |
|
|
221
|
-
| `FLOW_EXPIRED`, `FLOW_MISMATCH`, `FLOW_PURPOSE_MISMATCH`, `RETURN_TO_INVALID` | 400 — a social flow that lapsed or was spent; a callback that is not the cookie's flow (also an older instance reading the six-part cookie of a flow started with `stepUp` during a rolling deploy); a flow of the other kind than the `purpose` (`'signIn'` or `'link'`) passed to `social.complete`; a `returnTo` that leaves the site. Start again |
|
|
222
|
+
| `FLOW_EXPIRED`, `FLOW_MISMATCH`, `FLOW_PURPOSE_MISMATCH`, `RETURN_TO_INVALID` | 400 — a social flow that lapsed or was spent; a callback that is not the cookie's flow, or a link flow started before the user's e-mail was proved (also an older instance reading the six-part cookie of a flow started with `stepUp` during a rolling deploy); a flow of the other kind than the `purpose` (`'signIn'` or `'link'`) passed to `social.complete`; a `returnTo` that leaves the site. Start again |
|
|
222
223
|
| `PROVIDER_ERROR` | 502 — the social provider failed, refused or was unreachable; `reason` (`denied`, `refused`, `unreachable`) is for your logs, never a body |
|
|
223
224
|
| `MAGIC_LINK_DISABLED` | 404 — `magicLink.request`, `prepare` or `confirm` with `magicLink: { enabled: false }`; refused before any store access |
|
|
224
225
|
| `SOCIAL_PROVIDER_UNKNOWN` | 404 — a provider the user type does not configure; `provider` |
|
|
@@ -330,7 +331,7 @@ read it. Where you do show a total, ask for it apart: `auth.count()`, or
|
|
|
330
331
|
[users](docs/guide/users.md#searching-by-e-mail-prefix)), and `namePrefix` the
|
|
331
332
|
same way for the display name
|
|
332
333
|
([users](docs/guide/users.md#searching-by-display-name)). `nextCursor` is `string | null` with no `undefined`, so `while (cursor)`
|
|
333
|
-
is the loop.
|
|
334
|
+
is the loop. A page may come back short, even empty, with a `nextCursor`: follow it until it is `null`.
|
|
334
335
|
|
|
335
336
|
`fixedClock` is **shipped, not test-only** — testing session expiry needs it, and
|
|
336
337
|
so do your own tests.
|
|
@@ -773,6 +774,8 @@ Keeping the keys in one variable (`"id:key,id:key"`)? `parseSealingKeys(process.
|
|
|
773
774
|
|
|
774
775
|
Sealing a secret of your own with the same keys? `sealerFor(keys, 'integration-keys')` returns `{ seal(id, plaintext), unseal(id, sealed), sealWith, needsReseal(sealed) }` with a key derived for that purpose, so it never shares one with the second factor; `unseal` answers `null` on any failure ([guide](docs/guide/second-factor.md#sealing-your-own-secrets-sealerfor)).
|
|
775
776
|
|
|
777
|
+
Handing out a signed, expiring link (a download URL, an unsubscribe link)? `signToken(keys, 'download', payload, { expiresIn: '15m' })` returns `v1.<key id>.<payload>.<HMAC>` and `verifyToken(keys, 'download', token)` answers `{ payload, expiresAt, keyId, needsResign }` or `null` (expired, changed, another purpose, a key no longer held), with the same keys and rotation as `sealerFor` ([guide](docs/guide/signed-tokens.md)). Magic links do not use it: they store a hashed one-time secret.
|
|
778
|
+
|
|
776
779
|
- **`signIn` answers a union once `secondFactor` is configured**:
|
|
777
780
|
`{ status: 'signedIn', user, session, token }`, or
|
|
778
781
|
`{ status: 'secondFactor', challenge, expiresAt, userId }` for a user whose factor
|
|
@@ -1280,8 +1283,9 @@ type with an e-mail; `signInProven` alone proves nothing.
|
|
|
1280
1283
|
- **On an e-mail never proved, in one write**: marks it verified and drops
|
|
1281
1284
|
the password and the second factor — active or waiting, with its recovery
|
|
1282
1285
|
codes — and the avatar (`user.avatarRemoved` carries its `formerAvatarId`,
|
|
1283
|
-
so delete the image). It revokes every session and every API key and spends the reset links
|
|
1284
|
-
second-factor challenges
|
|
1286
|
+
so delete the image). It revokes every session and every API key and spends the reset links,
|
|
1287
|
+
second-factor challenges and what a session left waiting (an e-mail
|
|
1288
|
+
change, a link flow, a passkey registration, a step-up), before the write and after it, and sends
|
|
1285
1289
|
`user.emailVerified`, then `user.passwordChanged` when a password was
|
|
1286
1290
|
dropped and `user.secondFactorDisabled` when an active factor was.
|
|
1287
1291
|
Answers `{ user, proved: true }`.
|
|
@@ -1675,7 +1679,7 @@ core keeps, so the provider only checks them.
|
|
|
1675
1679
|
```ts
|
|
1676
1680
|
interface SocialFlowStart { readonly url: string; readonly flow: string; readonly expiresAt: Date; readonly setCookie: string }
|
|
1677
1681
|
type SocialCompleted<U, Challenge extends SecondFactorRequired = SecondFactorRequired> =
|
|
1678
|
-
| (SignedIn<U> & { provider: string; created: boolean; linked: boolean; returnTo: string | null; stepUp: SocialStepUpProof | null })
|
|
1682
|
+
| (SignedIn<U> & { provider: string; created: boolean; linked: boolean; replaced: boolean; returnTo: string | null; stepUp: SocialStepUpProof | null })
|
|
1679
1683
|
| (Challenge & { provider: string; returnTo: string | null; stepUp: SocialStepUpProof | null })
|
|
1680
1684
|
| SocialLinked<U>;
|
|
1681
1685
|
interface SocialLinked<U> { status: 'linked'; user: U; link: SocialLink; returnTo: string | null; stepUp: SocialStepUpProof | null }
|
|
@@ -1683,7 +1687,7 @@ interface SocialStepUpProof { acrValues: readonly string[] | null; maxAge: numbe
|
|
|
1683
1687
|
interface SocialLink { provider: string; accountId: string; email: string | null; linkedAt: Date }
|
|
1684
1688
|
```
|
|
1685
1689
|
|
|
1686
|
-
- **`social: { providers?, resolveProvider?, signUp?, freshWithin? }`** (one of `providers` and `resolveProvider` required) on a user type
|
|
1690
|
+
- **`social: { providers?, resolveProvider?, signUp?, unverifiedHolder?, freshWithin? }`** (one of `providers` and `resolveProvider` required) on a user type
|
|
1687
1691
|
(`users: { patient: { schema, social } }` for several). `providers` maps the
|
|
1688
1692
|
application's name for each provider (lowercase letters, digits and `-`,
|
|
1689
1693
|
starting with a letter, at most 32) to its `SocialProvider`. `resolveProvider(name)` (`SocialProviderResolver`, answering `Promise<SocialProvider | null>`)
|
|
@@ -1692,7 +1696,11 @@ interface SocialLink { provider: string; accountId: string; email: string | null
|
|
|
1692
1696
|
reaches it, `null` is `SOCIAL_PROVIDER_UNKNOWN`, a throw propagates untouched
|
|
1693
1697
|
(see the social guide). `providers` may then be left out. `signUp(profile)`
|
|
1694
1698
|
answers the fields of a new user, whose e-mail must be the provider's; absent or
|
|
1695
|
-
`false`, a stranger is refused. `
|
|
1699
|
+
`false`, a stranger is refused. `unverifiedHolder` (`'refuse'`, `'replace'`
|
|
1700
|
+
or a `SocialUnverifiedHolder`, `(holder, profile) => 'refuse' | 'replace'`;
|
|
1701
|
+
`'refuse'` when absent) decides
|
|
1702
|
+
what a provider-verified sign-in does with a user who holds the e-mail and
|
|
1703
|
+
never proved it: see the trap below. `freshWithin` (`'10m'`) is how recent the
|
|
1696
1704
|
session must be to `link`. `tokens: { socialFlow }` (`'10m'`) is how long a
|
|
1697
1705
|
flow waits for its callback. The store needs the `socialLinks` slot.
|
|
1698
1706
|
- **`social.start`** answers `{ url, flow, expiresAt, setCookie }`; `type` is
|
|
@@ -1718,7 +1726,8 @@ interface SocialLink { provider: string; accountId: string; email: string | null
|
|
|
1718
1726
|
`'link'`, the kind of flow the endpoint accepts, else `FLOW_PURPOSE_MISMATCH`;
|
|
1719
1727
|
see [social sign-in](docs/guide/social.md)), and answers
|
|
1720
1728
|
`signedIn` (`created`: a user was made; `linked`: this call linked the
|
|
1721
|
-
account
|
|
1729
|
+
account; `replaced`: an unverified holder of the e-mail was taken over,
|
|
1730
|
+
`social.unverifiedHolder`), `secondFactor` (a challenge; same as `signIn`) or `linked`. It takes
|
|
1722
1731
|
the `SignInOptions` of every sign-in (`device`).
|
|
1723
1732
|
- **Refusals**: `FLOW_EXPIRED`, `FLOW_MISMATCH`, `FLOW_PURPOSE_MISMATCH`,
|
|
1724
1733
|
`RETURN_TO_INVALID`, `PROVIDER_ERROR`, `SOCIAL_PROVIDER_UNKNOWN`, `SOCIAL_STEP_UP_UNMET`, `SIGN_UP_DISABLED`,
|
|
@@ -1759,19 +1768,19 @@ await auth.signUp({ email, password }); // the listener has the event before thi
|
|
|
1759
1768
|
| `type` | Sent by |
|
|
1760
1769
|
| --- | --- |
|
|
1761
1770
|
| `user.created` | `create`, `signUp` |
|
|
1762
|
-
| `user.emailVerified` | `verifyEmail.confirm` (with `{ firstProof: true }` it also drops a squatter's password and factor, like the next), `verifyEmail.proveFirst` and `setEmailVerified` (turning the flag on); `changeEmail.confirm`, `resetPassword.confirm`, `magicLink.confirm` and `signInCode.confirm`, whose link or code proves the e-mail too — never for an e-mail already verified |
|
|
1771
|
+
| `user.emailVerified` | `verifyEmail.confirm` (with `{ firstProof: true }` it also drops a squatter's password and factor, like the next), `verifyEmail.proveFirst` and `setEmailVerified` (turning the flag on); `changeEmail.confirm`, `resetPassword.confirm`, `magicLink.confirm` and `signInCode.confirm`, whose link or code proves the e-mail too; `social.complete` replacing an unverified holder (`social.unverifiedHolder`), whose provider does — never for an e-mail already verified |
|
|
1763
1772
|
| `user.passwordReset` | `resetPassword.confirm` |
|
|
1764
|
-
| `user.passwordChanged` | `changePassword`, `setPassword` (`first: true` when the user had no password before — skip the "changed" notice); `signInCode.confirm`, `magicLink.confirm` and `
|
|
1773
|
+
| `user.passwordChanged` | `changePassword`, `setPassword` (`first: true` when the user had no password before — skip the "changed" notice); `signInCode.confirm`, `magicLink.confirm`, `verifyEmail.proveFirst` and `social.complete` replacing an unverified holder (`social.unverifiedHolder`) when their first proof of the e-mail dropped a password — never a reset, which is `user.passwordReset` alone |
|
|
1765
1774
|
| `user.emailChanged` | `update` and `changeEmail.confirm`, when they changed the e-mail — carrying `formerEmail`, the address before (`null` for none) |
|
|
1766
1775
|
| `user.secondFactorEnabled` | `secondFactor.activate`, once the factor is active — not `enroll`, which leaves it waiting |
|
|
1767
|
-
| `user.secondFactorDisabled` | `secondFactor.disable`, when it removed an active factor; `signInCode.confirm`, `magicLink.confirm` and `
|
|
1776
|
+
| `user.secondFactorDisabled` | `secondFactor.disable`, when it removed an active factor; `signInCode.confirm`, `magicLink.confirm`, `verifyEmail.proveFirst` and `social.complete` replacing an unverified holder (`social.unverifiedHolder`) when their first proof of the e-mail removed one, after `user.emailVerified` and any `user.passwordChanged` — never for a user who had none, or one still waiting |
|
|
1768
1777
|
| `user.recoveryCodesRegenerated` | `secondFactor.regenerateRecoveryCodes` — not `activate`, whose codes come with `user.secondFactorEnabled` |
|
|
1769
1778
|
| `user.recoveryCodeUsed` | `secondFactor.recover`, once the recovery code is spent: a sign-in without the user's phone |
|
|
1770
1779
|
| `user.newDeviceSignedIn` | `signIn`, `secondFactor.confirm`, `secondFactor.recover`, `signInCode.confirm` and `magicLink.confirm`, given a `device` its token did not prove, once the sign-in is complete — carrying `sessionId`, the new session's. Never `signUp`, nor a call given no device |
|
|
1771
1780
|
| `user.avatarChanged` | `avatar.set`, when it wrote a different id — carrying `formerAvatarId`, the id replaced (`null` for a first avatar) |
|
|
1772
1781
|
| `user.avatarRemoved` | `avatar.remove`, when the user had one — carrying `formerAvatarId` |
|
|
1773
1782
|
| `user.socialLinked` | `social.complete`, when it linked an account: a link flow, a user matched by a verified e-mail, or the user a social sign-up created — carrying `provider`. Not for an account already linked to that user |
|
|
1774
|
-
| `user.socialUnlinked` | `social.unlink`, when it deleted a link — carrying `provider` |
|
|
1783
|
+
| `user.socialUnlinked` | `social.unlink`, when it deleted a link; `social.complete` replacing an unverified holder (`social.unverifiedHolder`), once per link it deleted — carrying `provider` |
|
|
1775
1784
|
| `user.passkeyAdded` | `passkeys.register`, once the passkey is stored — carrying `passkey: { credentialId, name }` |
|
|
1776
1785
|
| `user.passkeyRemoved` | `passkeys.remove`, when it deleted a passkey; `secondFactor.disable`, once per passkey it removed with the factor — carrying `passkey` |
|
|
1777
1786
|
| `user.passkeyCloneSuspected` | `secondFactor.confirmPasskey` or `stepUp.confirmPasskey`, when an assertion's counter did not move forward (both counters non-zero) — carrying `passkey`; the call is refused and the passkey stays active |
|
|
@@ -2262,6 +2271,8 @@ it must not read anything tied to the request (a body stream, a transaction, a
|
|
|
2262
2271
|
scoped connection), or it fails and logs `<name> failed in the background: …`.
|
|
2263
2272
|
Copy what it needs before calling `run`.
|
|
2264
2273
|
|
|
2274
|
+
**`verifyToken` answers `null` for every bad token.** A renamed `purpose`, a key dropped while tokens it signed are still out, an expired or a changed token all look the same, by design: answer 404 or 410, never say which. Keep a key until its tokens have expired ([guide](docs/guide/signed-tokens.md)).
|
|
2275
|
+
|
|
2265
2276
|
**`sealerFor` answers a silent `null` when a value cannot open.** Renaming a
|
|
2266
2277
|
`purpose`, or dropping a key before every value sealed with it was sealed
|
|
2267
2278
|
again, makes `unseal` answer `null` for those values, as it does for any
|
|
@@ -2826,6 +2837,22 @@ provider. The real owner recovers with `resetPassword`, or `verifyEmail` with
|
|
|
2826
2837
|
`{ firstProof: true }`, which prove the address and drop the squatter's
|
|
2827
2838
|
password; the next social sign-in then links.
|
|
2828
2839
|
|
|
2840
|
+
**`social.unverifiedHolder: 'replace'` lets the provider's proof be that first
|
|
2841
|
+
proof.** Where anyone can create an unverified account for an address (open
|
|
2842
|
+
sign-up, a sign-in code that creates the user), the refusal above locks the
|
|
2843
|
+
real owner out of a provider sign-in for as long as the account stays
|
|
2844
|
+
unverified. With `'replace'`, a sign-in whose provider vouches for the e-mail
|
|
2845
|
+
takes the account over: the social accounts linked to it are deleted, then the
|
|
2846
|
+
first proof of an e-mail runs (the password, the avatar, the second factor,
|
|
2847
|
+
the passkeys, the API keys and every session go; the e-mail is verified), then
|
|
2848
|
+
the account is linked and signed in, with `replaced: true` on the answer.
|
|
2849
|
+
**Only for providers whose `emailVerified` you trust for that address**: a
|
|
2850
|
+
provider that vouches wrongly hands the unverified account over. A function
|
|
2851
|
+
`(holder, profile) => 'refuse' | 'replace'` decides per provider and address
|
|
2852
|
+
(`profile.provider`, `profile.email`); anything but `'replace'` refuses. A
|
|
2853
|
+
verified holder is never replaced, and a provider that does not vouch never
|
|
2854
|
+
replaces.
|
|
2855
|
+
|
|
2829
2856
|
**One provider account links to one user per instance**, whatever the type:
|
|
2830
2857
|
the second is `SOCIAL_ACCOUNT_TAKEN`. One Google account cannot be both a
|
|
2831
2858
|
patient and a staff member.
|
|
@@ -2909,7 +2936,7 @@ subdomain) and `https`, except `http://localhost`, `http://<name>.localhost` (su
|
|
|
2909
2936
|
|
|
2910
2937
|
## Type safety, counted
|
|
2911
2938
|
|
|
2912
|
-
**Three hundred and
|
|
2939
|
+
**Three hundred and sixty-three plausible mistakes, three hundred and sixty-three refused at compile time — and
|
|
2913
2940
|
two gaps, named.**
|
|
2914
2941
|
|
|
2915
2942
|
The lists are typechecked and never run, with one `@ts-expect-error` per
|
|
@@ -2917,10 +2944,10 @@ mistake beside the shapes that must keep compiling. Two are single files:
|
|
|
2917
2944
|
`test/types/refusals.ts` (sixteen, on the shared vocabulary) and `test/types/issuers.ts` (four, on `createJanusIssuers`: no `resolve`, no `build`, a numeric `version`, an instance read without its `null`). The other four
|
|
2918
2945
|
are folders with one file per behaviour: `test/types/port/` (forty-nine, on
|
|
2919
2946
|
the identity stores' port, from the point of view of the person implementing
|
|
2920
|
-
it), `test/types/auth/` (
|
|
2947
|
+
it), `test/types/auth/` (two hundred and nine, on `janus()`, from the point of view of
|
|
2921
2948
|
the application — thirteen of them on the second factor, three on sign-in codes,
|
|
2922
2949
|
five on user events, four on step-ups, six on the sign-in throttle, five on the mail throttle, three on the second-factor throttle, four on
|
|
2923
|
-
sign-in links, six on devices, seven on reading and writing users (two of them on `findMany`), five on requests in two steps, three on signing in on the application's proof, three on finding a user by e-mail, three on proving an e-mail on the application's proof, six on changing an e-mail, sixteen on confirming a link at the root of several types and binding it to a user, twelve on the wiring of `janus()` (reserved type names included), six on signing up and in, four on `findOrCreate`, five on avatars, five on verified sign-up, two on the cut-off of `signOutEverywhere`, nine on API keys (five on scopes, bound objects and expiry notices), thirty-two on invitations — a `beforeAccept` that answers an object, a user type with no e-mail, a login that is not the e-mail, several types and no `type`, a `type` that is none of them, `accept` without the block, a `get` without its `scope`, a numeric `id`, an `issue` that leaves `invitedBy` out, a `ref`, `order`, `status`, `role` or `lapsed` of the wrong type, a `by` that is no string on `revoke` or `resend`, a list of types with an unknown name, a login that is not the e-mail or no e-mail, an empty list, a name listed twice, and an `issue` whose `type` is not a string, is none of the listed types or is missing with several types, and an `importHistory` record that is accepted without `acceptedAt`, revoked without `revokedAt`, of an unknown status, with no `key`, with a `type` that is not listed or a `createdAt` that is a string, and a `dryRun` that is no boolean — twenty on passkeys and four on the magic-link switch) `test/types/social/` (twenty-
|
|
2950
|
+
sign-in links, six on devices, seven on reading and writing users (two of them on `findMany`), five on requests in two steps, three on signing in on the application's proof, three on finding a user by e-mail, three on proving an e-mail on the application's proof, six on changing an e-mail, sixteen on confirming a link at the root of several types and binding it to a user, twelve on the wiring of `janus()` (reserved type names included), six on signing up and in, four on `findOrCreate`, five on avatars, five on verified sign-up, two on the cut-off of `signOutEverywhere`, nine on API keys (five on scopes, bound objects and expiry notices), thirty-two on invitations — a `beforeAccept` that answers an object, a user type with no e-mail, a login that is not the e-mail, several types and no `type`, a `type` that is none of them, `accept` without the block, a `get` without its `scope`, a numeric `id`, an `issue` that leaves `invitedBy` out, a `ref`, `order`, `status`, `role` or `lapsed` of the wrong type, a `by` that is no string on `revoke` or `resend`, a list of types with an unknown name, a login that is not the e-mail or no e-mail, an empty list, a name listed twice, and an `issue` whose `type` is not a string, is none of the listed types or is missing with several types, and an `importHistory` record that is accepted without `acceptedAt`, revoked without `revokedAt`, of an unknown status, with no `key`, with a `type` that is not listed or a `createdAt` that is a string, and a `dryRun` that is no boolean — twenty on passkeys and four on the magic-link switch) `test/types/social/` (twenty-three, on `auth.social`: a `social` block with neither providers nor a resolver, an `unverifiedHolder` that is an unknown word or a function answering a boolean, a `resolveProvider` that answers a name or undefined, or is not async, a step-up whose `acrValues` is a string, whose `maxAge` is no number, that asks for nothing or that has a third key, a misspelled provider, a type without social, social without an e-mail, a `signUp` on the wrong login or answering the wrong fields, a link given a bare user and a result switch missing a status and a `linked` result read for a session token) and `test/types/permissions/` (sixty, on the
|
|
2924
2951
|
permission model and the questions asked of it). The rule comes from
|
|
2925
2952
|
`nxgt-data`, and so does the reason to distrust the claim without the files:
|
|
2926
2953
|
when it was last measured on `@softistx/mongo`, *seven of twelve plausible
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { type AnyUser, type Context } from '../context';
|
|
6
6
|
import type { ApiKeyStore } from '../port/types';
|
|
7
|
-
import type { KeyAuthenticated } from '../types';
|
|
7
|
+
import type { KeyAuthenticated, ServiceKeyAuthenticated } from '../types';
|
|
8
8
|
/** Whether a token is shaped like one of this instance's keys. */
|
|
9
9
|
export declare function isKeyShaped(prefix: string, token: string): boolean;
|
|
10
10
|
/**
|
|
@@ -17,5 +17,6 @@ export declare function isKeyShaped(prefix: string, token: string): boolean;
|
|
|
17
17
|
*/
|
|
18
18
|
export declare function authenticateKey(context: Context, keys: ApiKeyStore, token: string, options: {
|
|
19
19
|
readonly type?: string;
|
|
20
|
-
|
|
20
|
+
readonly service?: boolean;
|
|
21
|
+
} | undefined): Promise<KeyAuthenticated<AnyUser> | ServiceKeyAuthenticated | null>;
|
|
21
22
|
//# sourceMappingURL=authenticate-key.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authenticate-key.d.ts","sourceRoot":"","sources":["../../../src/auth/api-keys/authenticate-key.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"authenticate-key.d.ts","sourceRoot":"","sources":["../../../src/auth/api-keys/authenticate-key.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,OAAO,EAAU,MAAM,YAAY,CAAC;AAChE,OAAO,KAAK,EAAgB,WAAW,EAAE,MAAM,eAAe,CAAC;AAE/D,OAAO,KAAK,EACX,gBAAgB,EAChB,uBAAuB,EAEvB,MAAM,UAAU,CAAC;AAIlB,kEAAkE;AAClE,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAElE;AAED;;;;;;;GAOG;AACH,wBAAsB,eAAe,CACpC,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,WAAW,EACjB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE;IAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,SAAS,GACzE,OAAO,CAAC,gBAAgB,CAAC,OAAO,CAAC,GAAG,uBAAuB,GAAG,IAAI,CAAC,CAuDrE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"count.d.ts","sourceRoot":"","sources":["../../../src/auth/api-keys/count.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD;;;;GAIG;AACH,wBAAsB,aAAa,CAClC,IAAI,EAAE,WAAW,EACjB,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,IAAI,EACT,MAAM,EAAE,MAAM,GACZ,OAAO,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"count.d.ts","sourceRoot":"","sources":["../../../src/auth/api-keys/count.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD;;;;GAIG;AACH,wBAAsB,aAAa,CAClC,IAAI,EAAE,WAAW,EACjB,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,IAAI,EACT,MAAM,EAAE,MAAM,GACZ,OAAO,CAAC,MAAM,CAAC,CAmBjB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** What both creations do once their key is inserted: keep it, or revoke it and rethrow. */
|
|
2
|
+
import type { Clock } from '../../../time/clock';
|
|
3
|
+
import type { ApiKeyStore } from '../../port/types';
|
|
4
|
+
/**
|
|
5
|
+
* Settles the checks that follow an insert (the race guard on the count, the
|
|
6
|
+
* creator still standing). A refusal or an outage must leave no standing key
|
|
7
|
+
* nobody holds: the key is revoked, and the failure rethrown. A revoke that
|
|
8
|
+
* fails too is warned of; the token is only answered when the checks pass.
|
|
9
|
+
*/
|
|
10
|
+
export declare function settleInsert(keys: ApiKeyStore, clock: Clock, id: string, checks: Promise<void>, noun: 'an API key' | 'a service key'): Promise<void>;
|
|
11
|
+
//# sourceMappingURL=after-insert.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"after-insert.d.ts","sourceRoot":"","sources":["../../../../src/auth/api-keys/create/after-insert.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAE5F,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD;;;;;GAKG;AACH,wBAAsB,YAAY,CACjC,IAAI,EAAE,WAAW,EACjB,KAAK,EAAE,KAAK,EACZ,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,EACrB,IAAI,EAAE,YAAY,GAAG,eAAe,GAClC,OAAO,CAAC,IAAI,CAAC,CAiBf"}
|
|
@@ -25,6 +25,16 @@ export declare function checkBeforeInsert(context: Context, settings: Settings,
|
|
|
25
25
|
scopes?: readonly string[];
|
|
26
26
|
};
|
|
27
27
|
}>;
|
|
28
|
+
/** A session fresh enough: a key never is, and a stale session needs a step-up. */
|
|
29
|
+
export declare function assertFreshCreator(context: Context, settings: Settings, current: Principal<{
|
|
30
|
+
readonly id: string;
|
|
31
|
+
readonly type: string;
|
|
32
|
+
}>, where?: string): void;
|
|
33
|
+
/** The creating user, read again: active, able to hold keys, e-mail proved, password still the one the session proved. */
|
|
34
|
+
export declare function loadCreator(context: Context, settings: Settings, current: Principal<{
|
|
35
|
+
readonly id: string;
|
|
36
|
+
readonly type: string;
|
|
37
|
+
}>, where?: string): Promise<import("../..").UserRecord>;
|
|
28
38
|
/**
|
|
29
39
|
* What can only be known once the key is stored: the limit still holds
|
|
30
40
|
* against a racing creation, the user still can hold a key, and the session
|
|
@@ -39,4 +49,11 @@ export declare function checkAfterInsert(context: Context, settings: Settings, k
|
|
|
39
49
|
readonly id: string;
|
|
40
50
|
readonly type: string;
|
|
41
51
|
}>, userId: string): Promise<void>;
|
|
52
|
+
/** The creator is still active with the password the session proved, and the session still stands. */
|
|
53
|
+
export declare function checkCreatorStands(context: Context, current: Principal<{
|
|
54
|
+
readonly id: string;
|
|
55
|
+
readonly type: string;
|
|
56
|
+
}>, userId: string, where?: string): Promise<void>;
|
|
57
|
+
export declare function checkName(name: unknown): string;
|
|
58
|
+
export declare function checkLifetime(settings: Settings, lifetime: unknown): number;
|
|
42
59
|
//# sourceMappingURL=checks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checks.d.ts","sourceRoot":"","sources":["../../../../src/auth/api-keys/create/checks.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAYlF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,KAAK,OAAO,EAAW,MAAM,eAAe,CAAC;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAIpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAKhE,eAAO,MAAM,KAAK,mBAAmB,CAAC;AAEtC,MAAM,MAAM,QAAQ,GAAG,WAAW,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC;AAE9D,0CAA0C;AAC1C,MAAM,MAAM,WAAW,GAAG,iBAAiB,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;AAE7D;;;;;GAKG;AACH,wBAAsB,iBAAiB,CACtC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,WAAW,EACjB,OAAO,EAAE,SAAS,CAAC;IAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,EAClE,KAAK,EAAE,WAAW;;;;;;;;
|
|
1
|
+
{"version":3,"file":"checks.d.ts","sourceRoot":"","sources":["../../../../src/auth/api-keys/create/checks.ts"],"names":[],"m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K,GAAE,MAAc,uCA8BrB;AA8BD;;;;;;;;;GASG;AACH,wBAAsB,gBAAgB,CACrC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,WAAW,EACjB,OAAO,EAAE,SAAS,CAAC;IAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,EAClE,MAAM,EAAE,MAAM,GACZ,OAAO,CAAC,IAAI,CAAC,CAUf;AAED,sGAAsG;AACtG,wBAAsB,kBAAkB,CACvC,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,SAAS,CAAC;IAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,EAClE,MAAM,EAAE,MAAM,EACd,KAAK,GAAE,MAAc,GACnB,OAAO,CAAC,IAAI,CAAC,CAgCf;AAOD,wBAAgB,SAAS,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAS/C;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,GAAG,MAAM,CAiB3E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/auth/api-keys/create/index.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAG5E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/auth/api-keys/create/index.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAG5E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAc,MAAM,aAAa,CAAC;AAKxE,OAAO,EACN,KAAK,WAAW,EAGhB,KAAK,QAAQ,EACb,MAAM,UAAU,CAAC;AAElB,wBAAsB,YAAY,CACjC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,WAAW,EACjB,OAAO,EAAE,SAAS,CAAC;IAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,EAClE,KAAK,EAAE,WAAW,GAChB,OAAO,CAAC,aAAa,CAAC,CA0CxB"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** The checks of `apiKeys.createService` that read only its input and configuration. */
|
|
2
|
+
import { ApiKeyLimitError } from '../../../errors/janus-error';
|
|
3
|
+
import type { CreateServiceKeyInput } from '../../types';
|
|
4
|
+
import { type Settings } from './checks';
|
|
5
|
+
export declare const WHERE = "apiKeys.createService";
|
|
6
|
+
export declare function limitReached(maxActive: number): ApiKeyLimitError;
|
|
7
|
+
export declare function checkOwner(owner: unknown): {
|
|
8
|
+
type: string;
|
|
9
|
+
id: string;
|
|
10
|
+
};
|
|
11
|
+
/** A configured lifetime in ms, or `null` for `'never'` when the configuration lists it. */
|
|
12
|
+
export declare function checkServiceLifetime(settings: Settings, lifetime: unknown): number | null;
|
|
13
|
+
export declare function checkDetails(details: unknown): Readonly<Record<string, unknown>> | undefined;
|
|
14
|
+
/** The name, owner, scopes, lifetime and details of a service key, checked in that order. */
|
|
15
|
+
export declare function checkServiceInput(settings: Settings, input: CreateServiceKeyInput<string | number> | undefined): {
|
|
16
|
+
name: string;
|
|
17
|
+
owner: {
|
|
18
|
+
type: string;
|
|
19
|
+
id: string;
|
|
20
|
+
};
|
|
21
|
+
scopes: readonly string[];
|
|
22
|
+
lifetimeMs: number | null;
|
|
23
|
+
details: Readonly<Record<string, unknown>> | undefined;
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=service-checks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service-checks.d.ts","sourceRoot":"","sources":["../../../../src/auth/api-keys/create/service-checks.ts"],"names":[],"mappings":"AAAA,wFAAwF;AAExF,OAAO,EAEN,gBAAgB,EAChB,MAAM,6BAA6B,CAAC;AAErC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEzD,OAAO,EAA4B,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEnE,eAAO,MAAM,KAAK,0BAA0B,CAAC;AAG7C,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB,CAKhE;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO;;;EAQxC;AAED,4FAA4F;AAC5F,wBAAgB,oBAAoB,CACnC,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,OAAO,GACf,MAAM,GAAG,IAAI,CASf;AAED,wBAAgB,YAAY,CAC3B,OAAO,EAAE,OAAO,GACd,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,SAAS,CAyB/C;AAED,6FAA6F;AAC7F,wBAAgB,iBAAiB,CAChC,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,qBAAqB,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,SAAS;;;;;;;;;EAazD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** `apiKeys.createService`: a key that belongs to an object, not to its creator. */
|
|
2
|
+
import type { Context } from '../../context';
|
|
3
|
+
import type { ApiKeyStore } from '../../port/types';
|
|
4
|
+
import type { ApiKey, CreatedApiKey, CreateServiceKeyInput, Principal } from '../../types';
|
|
5
|
+
import { type Settings } from './checks';
|
|
6
|
+
type Current = Principal<{
|
|
7
|
+
readonly id: string;
|
|
8
|
+
readonly type: string;
|
|
9
|
+
}>;
|
|
10
|
+
export declare function createServiceKey(context: Context, settings: Settings, keys: ApiKeyStore, current: Current, input: CreateServiceKeyInput<string | number>): Promise<CreatedApiKey<ApiKey>>;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../../src/auth/api-keys/create/service.ts"],"names":[],"mappings":"AAAA,oFAAoF;AAIpF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,OAAO,KAAK,EACX,MAAM,EACN,aAAa,EACb,qBAAqB,EACrB,SAAS,EACT,MAAM,aAAa,CAAC;AAMrB,OAAO,EAIN,KAAK,QAAQ,EACb,MAAM,UAAU,CAAC;AAGlB,KAAK,OAAO,GAAG,SAAS,CAAC;IAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAEzE,wBAAsB,gBAAgB,CACrC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,WAAW,EACjB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,qBAAqB,CAAC,MAAM,GAAG,MAAM,CAAC,GAC3C,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAmFhC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expiry.d.ts","sourceRoot":"","sources":["../../../src/auth/api-keys/expiry.ts"],"names":[],"mappings":"AAAA,iGAAiG;AAMjG,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"expiry.d.ts","sourceRoot":"","sources":["../../../src/auth/api-keys/expiry.ts"],"names":[],"mappings":"AAAA,iGAAiG;AAMjG,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAc,MAAM,UAAU,CAAC;AAIvD,KAAK,GAAG,GAAG,UAAU,CAAC;IACrB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACtB,CAAC,CAAC,SAAS,CAAC,CAAC;AAEd,wBAAgB,SAAS,CACxB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,WAAW,GACf,IAAI,CAAC,GAAG,EAAE,UAAU,GAAG,oBAAoB,CAAC,CA4C9C"}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
/** The `auth.apiKeys` surface: create, get, list, revoke, revokeAll, and the bound and expiry methods beside. */
|
|
2
2
|
import { type Context } from '../context';
|
|
3
3
|
import type { ApiKeyStore } from '../port/types';
|
|
4
|
-
import type { ApiKeysApi } from '../types';
|
|
4
|
+
import type { ApiKeysApi, ServiceKeysApi } from '../types';
|
|
5
5
|
/** `ApiKeysApi`, degenericised: `janus()` casts it to the typed form once. */
|
|
6
|
-
type
|
|
6
|
+
type ApiKeysOnly = ApiKeysApi<{
|
|
7
|
+
readonly id: string;
|
|
8
|
+
readonly type: string;
|
|
9
|
+
}>['apiKeys'];
|
|
10
|
+
type InternalApiKeysApi = ApiKeysOnly & ServiceKeysApi<{
|
|
7
11
|
readonly id: string;
|
|
8
12
|
readonly type: string;
|
|
9
13
|
}>['apiKeys'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flows.d.ts","sourceRoot":"","sources":["../../../src/auth/api-keys/flows.ts"],"names":[],"mappings":"AAAA,iHAAiH;AAIjH,OAAO,EAAE,KAAK,OAAO,EAAS,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"flows.d.ts","sourceRoot":"","sources":["../../../src/auth/api-keys/flows.ts"],"names":[],"mappings":"AAAA,iHAAiH;AAIjH,OAAO,EAAE,KAAK,OAAO,EAAS,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAQ3D,8EAA8E;AAC9E,KAAK,WAAW,GAAG,UAAU,CAAC;IAC7B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACtB,CAAC,CAAC,SAAS,CAAC,CAAC;AACd,KAAK,kBAAkB,GAAG,WAAW,GACpC,cAAc,CAAC;IACd,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACtB,CAAC,CAAC,SAAS,CAAC,CAAC;AAEf,wEAAwE;AACxE,wBAAgB,UAAU,CACzB,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,WAAW,GACf,kBAAkB,CAyDpB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** The service keys of one object: the bound keys that no user holds. */
|
|
2
|
+
import type { CursorPage } from '../../pagination/cursor-page';
|
|
3
|
+
import type { ApiKeyBound, ApiKeyPageRequest, ApiKeyRecord, ApiKeyStore } from '../port/types';
|
|
4
|
+
/**
|
|
5
|
+
* One page of the service keys bound to `owner`, in id order: the store's
|
|
6
|
+
* `listBoundApiKeys`, read `READ` at a time and kept when `userId` is `null`,
|
|
7
|
+
* until the page fills (one more is read to know whether another follows).
|
|
8
|
+
*/
|
|
9
|
+
export declare function listOwnedRecords(keys: ApiKeyStore, owner: ApiKeyBound, { first, after }: ApiKeyPageRequest, where: string): Promise<CursorPage<ApiKeyRecord>>;
|
|
10
|
+
/** How many standing service keys `owner` holds at `now`, counted up to `stopAt`. */
|
|
11
|
+
export declare function countOwnedStanding(keys: ApiKeyStore, owner: ApiKeyBound, now: Date, stopAt: number, where: string): Promise<number>;
|
|
12
|
+
//# sourceMappingURL=owned.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"owned.d.ts","sourceRoot":"","sources":["../../../src/auth/api-keys/owned.ts"],"names":[],"mappings":"AAAA,yEAAyE;AAEzE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE/D,OAAO,KAAK,EACX,WAAW,EACX,iBAAiB,EACjB,YAAY,EACZ,WAAW,EACX,MAAM,eAAe,CAAC;AAKvB;;;;GAIG;AACH,wBAAsB,gBAAgB,CACrC,IAAI,EAAE,WAAW,EACjB,KAAK,EAAE,WAAW,EAClB,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,iBAAiB,EACnC,KAAK,EAAE,MAAM,GACX,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAqBnC;AAED,qFAAqF;AACrF,wBAAsB,kBAAkB,CACvC,IAAI,EAAE,WAAW,EACjB,KAAK,EAAE,WAAW,EAClB,GAAG,EAAE,IAAI,EACT,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GACX,OAAO,CAAC,MAAM,CAAC,CAqBjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../../../src/auth/api-keys/read.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAK5E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../../../src/auth/api-keys/read.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAK5E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAc,MAAM,UAAU,CAAC;AAKvD,KAAK,GAAG,GAAG,UAAU,CAAC;IACrB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACtB,CAAC,CAAC,SAAS,CAAC,CAAC;AAEd,wBAAgB,OAAO,CACtB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,WAAW,GACf,IAAI,CAAC,GAAG,EAAE,KAAK,GAAG,MAAM,CAAC,CAqD3B"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** The service half of `auth.apiKeys`: createService, listOwned and revokeOwned. */
|
|
2
|
+
import type { Context } from '../context';
|
|
3
|
+
import type { ApiKeyStore } from '../port/types';
|
|
4
|
+
import type { ServiceKeysApi } from '../types';
|
|
5
|
+
import type { Settings } from './create/checks';
|
|
6
|
+
type Service = ServiceKeysApi<{
|
|
7
|
+
readonly id: string;
|
|
8
|
+
readonly type: string;
|
|
9
|
+
}>['apiKeys'];
|
|
10
|
+
/** Only built when `apiKeys.service` is configured. */
|
|
11
|
+
export declare function serviceApi(context: Context, settings: Settings, keys: ApiKeyStore): Service;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=service-flows.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service-flows.d.ts","sourceRoot":"","sources":["../../../src/auth/api-keys/service-flows.ts"],"names":[],"mappings":"AAAA,oFAAoF;AAKpF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAMhD,KAAK,OAAO,GAAG,cAAc,CAAC;IAC7B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACtB,CAAC,CAAC,SAAS,CAAC,CAAC;AAEd,uDAAuD;AACvD,wBAAgB,UAAU,CACzB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,WAAW,GACf,OAAO,CA4CT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"to-api-key.d.ts","sourceRoot":"","sources":["../../../src/auth/api-keys/to-api-key.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGvC;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"to-api-key.d.ts","sourceRoot":"","sources":["../../../src/auth/api-keys/to-api-key.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGvC;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,GAAG,MAAM,CAiBrE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Duration } from '../../time/duration';
|
|
2
|
-
import type { ApiKeyStore } from '../port/types';
|
|
2
|
+
import type { ApiKeyBound, ApiKeyStore } from '../port/types';
|
|
3
3
|
/** What API keys need: their store, a token prefix, and the lifetimes a key may have. */
|
|
4
4
|
export interface ApiKeysConfig {
|
|
5
5
|
/** `createMemoryApiKeys()`, or an adapter's. */
|
|
@@ -13,8 +13,10 @@ export interface ApiKeysConfig {
|
|
|
13
13
|
/**
|
|
14
14
|
* The lifetimes a key may be created with — at least `'1d'` each. **There
|
|
15
15
|
* is no default and no unlimited key**: the user picks one of these.
|
|
16
|
+
* `'never'` is the opt-in of **service keys** (it needs `service`): only
|
|
17
|
+
* `apiKeys.createService` takes it, a user's key never does.
|
|
16
18
|
*/
|
|
17
|
-
readonly lifetimes: readonly [Duration, ...Duration[]];
|
|
19
|
+
readonly lifetimes: readonly [Duration | 'never', ...(Duration | 'never')[]];
|
|
18
20
|
/** The standing keys one user may hold, 1 to 100. `10` when absent. */
|
|
19
21
|
readonly maxActive?: number;
|
|
20
22
|
/** How recently the session must have proved who it is to create a key. `'10m'` when absent. */
|
|
@@ -29,5 +31,30 @@ export interface ApiKeysConfig {
|
|
|
29
31
|
* them. `changePassword` and `signOutEverywhere` never touch keys.
|
|
30
32
|
*/
|
|
31
33
|
readonly revokeOnPasswordReset?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Turns on service keys — `apiKeys.createService`, `listOwned`,
|
|
36
|
+
* `revokeOwned` — keys that belong to an object, outlive their creator and
|
|
37
|
+
* may never expire. Absent: no service key can be made.
|
|
38
|
+
*/
|
|
39
|
+
readonly service?: ServiceKeysConfig;
|
|
40
|
+
}
|
|
41
|
+
/** What service keys need: who may make one, and how many an owner may hold. */
|
|
42
|
+
export interface ServiceKeysConfig {
|
|
43
|
+
/**
|
|
44
|
+
* Called after the session and the user are checked, before anything is
|
|
45
|
+
* written. `false` refuses with `API_KEY_REFUSED` (403); a throw is thrown
|
|
46
|
+
* as it is. This is where the application checks that `user` may manage
|
|
47
|
+
* keys of `owner` and ask for `scopes`.
|
|
48
|
+
*/
|
|
49
|
+
readonly authorize: (request: {
|
|
50
|
+
readonly user: {
|
|
51
|
+
readonly id: string;
|
|
52
|
+
readonly type: string;
|
|
53
|
+
};
|
|
54
|
+
readonly owner: ApiKeyBound;
|
|
55
|
+
readonly scopes: readonly string[];
|
|
56
|
+
}) => boolean | Promise<boolean>;
|
|
57
|
+
/** The standing service keys one owner may hold, 1 to 100. `10` when absent. */
|
|
58
|
+
readonly maxActive?: number;
|
|
32
59
|
}
|
|
33
60
|
//# sourceMappingURL=api-keys-config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-keys-config.d.ts","sourceRoot":"","sources":["../../../src/auth/config/api-keys-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"api-keys-config.d.ts","sourceRoot":"","sources":["../../../src/auth/config/api-keys-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE9D,yFAAyF;AACzF,MAAM,WAAW,aAAa;IAC7B,gDAAgD;IAChD,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;IAC5B;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB;;;;;OAKG;IACH,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC,QAAQ,GAAG,OAAO,EAAE,GAAG,CAAC,QAAQ,GAAG,OAAO,CAAC,EAAE,CAAC,CAAC;IAC7E,uEAAuE;IACvE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,gGAAgG;IAChG,QAAQ,CAAC,WAAW,CAAC,EAAE,QAAQ,CAAC;IAChC,uFAAuF;IACvF,QAAQ,CAAC,aAAa,CAAC,EAAE,QAAQ,CAAC;IAClC,iEAAiE;IACjE,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC;;;;OAIG;IACH,QAAQ,CAAC,qBAAqB,CAAC,EAAE,OAAO,CAAC;IACzC;;;;OAIG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,iBAAiB,CAAC;CACrC;AAED,gFAAgF;AAChF,MAAM,WAAW,iBAAiB;IACjC;;;;;OAKG;IACH,QAAQ,CAAC,SAAS,EAAE,CAAC,OAAO,EAAE;QAC7B,QAAQ,CAAC,IAAI,EAAE;YAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;YAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;SAAE,CAAC;QAC9D,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;QAC5B,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;KACnC,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACjC,gFAAgF;IAChF,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC5B"}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*
|
|
9
9
|
* Gathered here from the files beside this one.
|
|
10
10
|
*/
|
|
11
|
-
export type { ApiKeysConfig } from './api-keys-config';
|
|
11
|
+
export type { ApiKeysConfig, ServiceKeysConfig } from './api-keys-config';
|
|
12
12
|
export type { PasswordHasher } from './hasher';
|
|
13
13
|
export type { InvitationsConfig } from './invitations-config';
|
|
14
14
|
export type { CookieConfig, DevicesConfig, JanusConfig, MailConfig, MailThrottleConfig, MultiTypeConfig, SecondFactorConfig, SecondFactorThrottleConfig, SignInConfig, SignInThrottleConfig, SingleTypeConfig, } from './janus-config';
|
|
@@ -19,6 +19,6 @@ export type { PasswordConfig } from './password-config';
|
|
|
19
19
|
export { RESERVED_FIELDS, RESERVED_TYPES, SINGLE_TYPE } from './reserved';
|
|
20
20
|
export { resolveConfig } from './resolve-config';
|
|
21
21
|
export type { ResolvedConfig, ResolvedSocial, ResolvedType, } from './resolved-config';
|
|
22
|
-
export type { FederatedAmr, SocialConfig, SocialIdentity, SocialProfile, SocialProvider, SocialProviderResolver, SocialStepUpRequest, } from './social-config';
|
|
22
|
+
export type { FederatedAmr, SocialConfig, SocialIdentity, SocialProfile, SocialProvider, SocialProviderResolver, SocialStepUpRequest, SocialUnverifiedHolder, } from './social-config';
|
|
23
23
|
export type { FieldsJson, SessionConfig, UserSchema, UserTypeConfig, } from './user-type';
|
|
24
24
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/auth/config/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,YAAY,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/auth/config/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,YAAY,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC1E,YAAY,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,YAAY,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,YAAY,EACX,YAAY,EACZ,aAAa,EACb,WAAW,EACX,UAAU,EACV,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EAClB,0BAA0B,EAC1B,YAAY,EACZ,oBAAoB,EACpB,gBAAgB,GAChB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,KAAK,SAAS,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AACvE,YAAY,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,YAAY,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,YAAY,EACX,cAAc,EACd,cAAc,EACd,YAAY,GACZ,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EACX,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,aAAa,EACb,cAAc,EACd,sBAAsB,EACtB,mBAAmB,EACnB,sBAAsB,GACtB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACX,UAAU,EACV,aAAa,EACb,UAAU,EACV,cAAc,GACd,MAAM,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-api-keys.d.ts","sourceRoot":"","sources":["../../../src/auth/config/resolve-api-keys.ts"],"names":[],"mappings":"AAAA,sHAAsH;AAGtH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAKtE,wBAAgB,cAAc,CAC7B,MAAM,EAAE,aAAa,GAAG,SAAS,EACjC,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,YAAY,CAAC,EACxC,KAAK,EAAE,MAAM,GACX,cAAc,CAAC,SAAS,CAAC,
|
|
1
|
+
{"version":3,"file":"resolve-api-keys.d.ts","sourceRoot":"","sources":["../../../src/auth/config/resolve-api-keys.ts"],"names":[],"mappings":"AAAA,sHAAsH;AAGtH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAKtE,wBAAgB,cAAc,CAC7B,MAAM,EAAE,aAAa,GAAG,SAAS,EACjC,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,YAAY,CAAC,EACxC,KAAK,EAAE,MAAM,GACX,cAAc,CAAC,SAAS,CAAC,CA+D3B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Resolves a user type's `social` block: the providers, the resolver, `signUp` and the freshness link demands. */
|
|
1
|
+
/** Resolves a user type's `social` block: the providers, the resolver, `signUp`, `unverifiedHolder` and the freshness link demands. */
|
|
2
2
|
import type { ResolvedSocial } from './resolved-config';
|
|
3
3
|
import type { SocialConfig, SocialProvider } from './social-config';
|
|
4
4
|
/** A provider's name: what a URL, a link record and an event carry. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-social.d.ts","sourceRoot":"","sources":["../../../src/auth/config/resolve-social.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"resolve-social.d.ts","sourceRoot":"","sources":["../../../src/auth/config/resolve-social.ts"],"names":[],"mappings":"AAAA,uIAAuI;AAIvI,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEpE,uEAAuE;AACvE,eAAO,MAAM,aAAa,QAA2B,CAAC;AAEtD;;;;GAIG;AACH,wBAAgB,aAAa,CAC5B,MAAM,EAAE,YAAY,GAAG,SAAS,EAChC,IAAI,EAAE;IAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EAC/D,EAAE,EAAE,MAAM,GACR,cAAc,GAAG,IAAI,CAkEvB;AAED,2GAA2G;AAC3G,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,cAAc,CAMxE"}
|
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
import type { InvitationEventListener } from '../invitations/events';
|
|
6
6
|
import type { PasskeyRelyingParty, PasskeyVerifier } from '../passkeys/verifier';
|
|
7
7
|
import type { Sealer } from '../sealing';
|
|
8
|
+
import type { ApiKeysConfig } from './api-keys-config';
|
|
8
9
|
import type { InvitationsConfig } from './invitations-config';
|
|
9
|
-
import type { SocialProfile, SocialProvider, SocialProviderResolver } from './social-config';
|
|
10
|
+
import type { SocialProfile, SocialProvider, SocialProviderResolver, SocialUnverifiedHolder } from './social-config';
|
|
10
11
|
import type { UserSchema } from './user-type';
|
|
11
12
|
/** A user type's `social` block, resolved. */
|
|
12
13
|
export interface ResolvedSocial {
|
|
@@ -16,6 +17,8 @@ export interface ResolvedSocial {
|
|
|
16
17
|
readonly resolveProvider: SocialProviderResolver | null;
|
|
17
18
|
/** `false` when a stranger may not sign up. */
|
|
18
19
|
readonly signUp: false | ((profile: SocialProfile) => unknown);
|
|
20
|
+
/** `'refuse'` when the configuration names none. */
|
|
21
|
+
readonly unverifiedHolder: 'refuse' | 'replace' | SocialUnverifiedHolder;
|
|
19
22
|
readonly freshWithinMs: number;
|
|
20
23
|
}
|
|
21
24
|
/** One user type, with every default applied and every duration in milliseconds. */
|
|
@@ -97,6 +100,13 @@ export interface ResolvedConfig {
|
|
|
97
100
|
readonly apiKeys: {
|
|
98
101
|
readonly prefix: string;
|
|
99
102
|
readonly lifetimesMs: readonly number[];
|
|
103
|
+
/** Whether `lifetimes` lists `'never'`. */
|
|
104
|
+
readonly never: boolean;
|
|
105
|
+
/** `null` without `apiKeys.service`. */
|
|
106
|
+
readonly service: {
|
|
107
|
+
readonly authorize: NonNullable<ApiKeysConfig['service']>['authorize'];
|
|
108
|
+
readonly maxActive: number;
|
|
109
|
+
} | null;
|
|
100
110
|
readonly maxActive: number;
|
|
101
111
|
readonly freshWithinMs: number;
|
|
102
112
|
readonly lastUsedEveryMs: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolved-config.d.ts","sourceRoot":"","sources":["../../../src/auth/config/resolved-config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,KAAK,EACX,mBAAmB,EACnB,eAAe,EACf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,K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