@owlmeans/server-auth 0.1.18-rc.8 → 0.1.18
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 +216 -38
- package/agent-meta/manifest.json +10 -3
- package/agent-meta/skills/server-auth/SKILL.md +161 -22
- package/agent-meta/skills/supervisor-auth/SKILL.md +128 -0
- package/build/actions/service.d.ts +6 -2
- package/build/actions/service.d.ts.map +1 -1
- package/build/actions/service.js +5 -4
- package/build/actions/service.js.map +1 -1
- package/build/actions/types.local.d.ts +6 -0
- package/build/actions/types.local.d.ts.map +1 -0
- package/build/actions/types.local.js +2 -0
- package/build/actions/types.local.js.map +1 -0
- package/build/entrypoints.d.ts +5 -0
- package/build/entrypoints.d.ts.map +1 -0
- package/build/entrypoints.js +9 -0
- package/build/entrypoints.js.map +1 -0
- package/build/index.d.ts +2 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +2 -1
- package/build/index.js.map +1 -1
- package/build/manager/actions/authenticate.d.ts +8 -0
- package/build/manager/actions/authenticate.d.ts.map +1 -0
- package/build/manager/actions/authenticate.js +5 -0
- package/build/manager/actions/authenticate.js.map +1 -0
- package/build/manager/actions/index.d.ts +3 -1
- package/build/manager/actions/index.d.ts.map +1 -1
- package/build/manager/actions/index.js +3 -1
- package/build/manager/actions/index.js.map +1 -1
- package/build/manager/actions/init.d.ts +8 -0
- package/build/manager/actions/init.d.ts.map +1 -0
- package/build/manager/actions/init.js +5 -0
- package/build/manager/actions/init.js.map +1 -0
- package/build/manager/actions/rely.d.ts +8 -0
- package/build/manager/actions/rely.d.ts.map +1 -0
- package/build/manager/actions/rely.js +7 -0
- package/build/manager/actions/rely.js.map +1 -0
- package/build/manager/consts.local.d.ts +2 -0
- package/build/manager/consts.local.d.ts.map +1 -0
- package/build/manager/consts.local.js +2 -0
- package/build/manager/consts.local.js.map +1 -0
- package/build/manager/context.d.ts.map +1 -1
- package/build/manager/context.js +0 -1
- package/build/manager/context.js.map +1 -1
- package/build/manager/entrypoints.d.ts +9 -0
- package/build/manager/entrypoints.d.ts.map +1 -0
- package/build/manager/entrypoints.js +16 -0
- package/build/manager/entrypoints.js.map +1 -0
- package/build/manager/exports.d.ts +1 -2
- package/build/manager/exports.d.ts.map +1 -1
- package/build/manager/exports.js +1 -2
- package/build/manager/exports.js.map +1 -1
- package/build/manager/index.d.ts +1 -1
- package/build/manager/index.d.ts.map +1 -1
- package/build/manager/index.js +1 -1
- package/build/manager/index.js.map +1 -1
- package/build/manager/main.d.ts.map +1 -1
- package/build/manager/main.js +2 -2
- package/build/manager/main.js.map +1 -1
- package/build/manager/model.d.ts.map +1 -1
- package/build/manager/model.js +71 -32
- package/build/manager/model.js.map +1 -1
- package/build/manager/plugins/basic-ed25519.d.ts +1 -1
- package/build/manager/plugins/basic-ed25519.d.ts.map +1 -1
- package/build/manager/plugins/basic-ed25519.js +6 -6
- package/build/manager/plugins/basic-ed25519.js.map +1 -1
- package/build/manager/plugins/basic-rely.d.ts +1 -1
- package/build/manager/plugins/basic-rely.d.ts.map +1 -1
- package/build/manager/plugins/basic-rely.js +11 -8
- package/build/manager/plugins/basic-rely.js.map +1 -1
- package/build/manager/plugins/consts.d.ts +8 -0
- package/build/manager/plugins/consts.d.ts.map +1 -0
- package/build/manager/plugins/consts.js +9 -0
- package/build/manager/plugins/consts.js.map +1 -0
- package/build/manager/plugins/export.d.ts +5 -0
- package/build/manager/plugins/export.d.ts.map +1 -1
- package/build/manager/plugins/export.js +4 -0
- package/build/manager/plugins/export.js.map +1 -1
- package/build/manager/plugins/index.d.ts +3 -4
- package/build/manager/plugins/index.d.ts.map +1 -1
- package/build/manager/plugins/index.js +6 -6
- package/build/manager/plugins/index.js.map +1 -1
- package/build/manager/plugins/re-captcha/consts.d.ts +7 -0
- package/build/manager/plugins/re-captcha/consts.d.ts.map +1 -0
- package/build/manager/plugins/re-captcha/consts.js +7 -0
- package/build/manager/plugins/re-captcha/consts.js.map +1 -0
- package/build/manager/plugins/re-captcha/consts.local.d.ts +7 -0
- package/build/manager/plugins/re-captcha/consts.local.d.ts.map +1 -0
- package/build/manager/plugins/re-captcha/consts.local.js +9 -0
- package/build/manager/plugins/re-captcha/consts.local.js.map +1 -0
- package/build/manager/plugins/re-captcha/policy.d.ts +3 -0
- package/build/manager/plugins/re-captcha/policy.d.ts.map +1 -0
- package/build/manager/plugins/re-captcha/policy.js +44 -0
- package/build/manager/plugins/re-captcha/policy.js.map +1 -0
- package/build/manager/plugins/re-captcha/types.d.ts +79 -0
- package/build/manager/plugins/re-captcha/types.d.ts.map +1 -0
- package/build/manager/plugins/re-captcha/types.js +2 -0
- package/build/manager/plugins/re-captcha/types.js.map +1 -0
- package/build/manager/plugins/re-captcha/verifier.d.ts +12 -0
- package/build/manager/plugins/re-captcha/verifier.d.ts.map +1 -0
- package/build/manager/plugins/re-captcha/verifier.js +62 -0
- package/build/manager/plugins/re-captcha/verifier.js.map +1 -0
- package/build/manager/plugins/re-captcha.d.ts +10 -1
- package/build/manager/plugins/re-captcha.d.ts.map +1 -1
- package/build/manager/plugins/re-captcha.js +50 -37
- package/build/manager/plugins/re-captcha.js.map +1 -1
- package/build/manager/plugins/supervisor.d.ts +1 -2
- package/build/manager/plugins/supervisor.d.ts.map +1 -1
- package/build/manager/plugins/supervisor.js +6 -6
- package/build/manager/plugins/supervisor.js.map +1 -1
- package/build/manager/plugins/types.d.ts +22 -14
- package/build/manager/plugins/types.d.ts.map +1 -1
- package/build/manager/plugins/utils.d.ts +5 -4
- package/build/manager/plugins/utils.d.ts.map +1 -1
- package/build/manager/plugins/utils.js +20 -15
- package/build/manager/plugins/utils.js.map +1 -1
- package/build/manager/rely/flow.d.ts.map +1 -1
- package/build/manager/rely/flow.js +13 -11
- package/build/manager/rely/flow.js.map +1 -1
- package/build/manager/rely.d.ts.map +1 -1
- package/build/manager/rely.js.map +1 -1
- package/build/manager/supervisor.d.ts +4 -45
- package/build/manager/supervisor.d.ts.map +1 -1
- package/build/manager/supervisor.js +5 -5
- package/build/manager/supervisor.js.map +1 -1
- package/build/manager/types.d.ts +41 -1
- package/build/manager/types.d.ts.map +1 -1
- package/build/manager/types.local.d.ts +4 -0
- package/build/manager/types.local.d.ts.map +1 -0
- package/build/manager/types.local.js +2 -0
- package/build/manager/types.local.js.map +1 -0
- package/build/manager/utils/trusted.d.ts.map +1 -1
- package/build/manager/utils/trusted.js.map +1 -1
- package/build/model/rely/consumer.d.ts +3 -1
- package/build/model/rely/consumer.d.ts.map +1 -1
- package/build/model/rely/consumer.js.map +1 -1
- package/build/model/rely/peer.d.ts.map +1 -1
- package/build/model/rely/peer.js +7 -7
- package/build/model/rely/peer.js.map +1 -1
- package/build/model/rely/provider.d.ts +3 -1
- package/build/model/rely/provider.d.ts.map +1 -1
- package/build/model/rely/provider.js.map +1 -1
- package/build/re-captcha/guard.d.ts +12 -0
- package/build/re-captcha/guard.d.ts.map +1 -0
- package/build/re-captcha/guard.js +43 -0
- package/build/re-captcha/guard.js.map +1 -0
- package/build/re-captcha/index.d.ts +4 -0
- package/build/re-captcha/index.d.ts.map +1 -0
- package/build/re-captcha/index.js +3 -0
- package/build/re-captcha/index.js.map +1 -0
- package/build/re-captcha/token.d.ts +6 -0
- package/build/re-captcha/token.d.ts.map +1 -0
- package/build/re-captcha/token.js +74 -0
- package/build/re-captcha/token.js.map +1 -0
- package/build/re-captcha/types.d.ts +44 -0
- package/build/re-captcha/types.d.ts.map +1 -0
- package/build/re-captcha/types.js +2 -0
- package/build/re-captcha/types.js.map +1 -0
- package/build/service.d.ts +2 -3
- package/build/service.d.ts.map +1 -1
- package/build/service.js +136 -13
- package/build/service.js.map +1 -1
- package/build/types.local.d.ts +4 -0
- package/build/types.local.d.ts.map +1 -0
- package/build/types.local.js +2 -0
- package/build/types.local.js.map +1 -0
- package/package.json +33 -30
- package/src/actions/service.ts +10 -12
- package/src/actions/types.local.ts +6 -0
- package/src/entrypoints.ts +12 -0
- package/src/index.ts +2 -2
- package/src/manager/README.md +14 -18
- package/src/manager/actions/authenticate.ts +12 -0
- package/src/manager/actions/index.ts +3 -1
- package/src/manager/actions/init.ts +12 -0
- package/src/manager/actions/rely.ts +12 -0
- package/src/manager/consts.local.ts +1 -0
- package/src/manager/context.ts +0 -2
- package/src/manager/entrypoints.ts +17 -0
- package/src/manager/exports.ts +1 -2
- package/src/manager/index.ts +1 -1
- package/src/manager/main.ts +2 -2
- package/src/manager/model.ts +82 -41
- package/src/manager/plugins/basic-ed25519.ts +8 -8
- package/src/manager/plugins/basic-rely.ts +14 -9
- package/src/manager/plugins/consts.ts +7 -0
- package/src/manager/plugins/export.ts +5 -0
- package/src/manager/plugins/index.ts +10 -12
- package/src/manager/plugins/re-captcha/consts.local.ts +8 -0
- package/src/manager/plugins/re-captcha/consts.ts +8 -0
- package/src/manager/plugins/re-captcha/policy.ts +56 -0
- package/src/manager/plugins/re-captcha/types.ts +85 -0
- package/src/manager/plugins/re-captcha/verifier.ts +74 -0
- package/src/manager/plugins/re-captcha.ts +58 -43
- package/src/manager/plugins/supervisor.ts +9 -11
- package/src/manager/plugins/types.ts +23 -14
- package/src/manager/plugins/utils.ts +24 -14
- package/src/manager/rely/flow.ts +14 -11
- package/src/manager/rely.ts +2 -5
- package/src/manager/supervisor.ts +8 -54
- package/src/manager/types.local.ts +5 -0
- package/src/manager/types.ts +46 -1
- package/src/model/rely/consumer.ts +3 -1
- package/src/model/rely/peer.ts +8 -8
- package/src/model/rely/provider.ts +3 -1
- package/src/re-captcha/guard.ts +52 -0
- package/src/re-captcha/index.ts +3 -0
- package/src/re-captcha/token.ts +89 -0
- package/src/re-captcha/types.ts +45 -0
- package/src/service.ts +133 -19
- package/src/types.local.ts +5 -0
- package/tests/context.ts +3 -2
- package/tests/re-captcha.spec.ts +298 -0
- package/tests/replay-policy.spec.ts +36 -0
- package/tests/supervisor.spec.ts +6 -4
- package/build/.gitkeep +0 -0
- package/src/manager/actions/manager.ts +0 -23
- package/src/manager/modules.ts +0 -29
- package/src/modules.ts +0 -17
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: supervisor-auth
|
|
3
|
+
description: PK-based supervisor authentication — a development-only login where a holder of one of the project's trusted private keys mints a token for any user id/email (registering them on first use), bypassing external IdPs. Primary use is end-to-end tests. Covers appendSupervisorAuth (server + web), the supervisor plugin, and the @owlmeans/test-ui helpers. Use when wiring or testing supervisor auth.
|
|
4
|
+
user-invocable: false
|
|
5
|
+
---
|
|
6
|
+
<!-- AUTO-GENERATED — do not edit. Regenerate via sync-agent-meta. -->
|
|
7
|
+
|
|
8
|
+
# PK-Based Supervisor Authentication
|
|
9
|
+
|
|
10
|
+
**Layer:** Server (`@owlmeans/server-auth`) + Web (`@owlmeans/web-auth`) + Tests (`@owlmeans/test-ui`)
|
|
11
|
+
|
|
12
|
+
A privileged, **development-only** auth path: a holder of one of the project's trusted private keys
|
|
13
|
+
(the allowlisted "supervisors") signs a server challenge to mint a valid owlmeans token for an
|
|
14
|
+
arbitrary user id / email — **without** Google/OIDC. Unknown users are **registered** on first use.
|
|
15
|
+
The primary purpose is deterministic **end-to-end tests** that authenticate against real environments.
|
|
16
|
+
|
|
17
|
+
It reuses the existing flow end-to-end: the plugin only **verifies the supervisor signature and
|
|
18
|
+
resolves/registers the user**, then hands the mutated credential back to the auth manager's own
|
|
19
|
+
model (which signs the credential envelope) and to the project's auth service (which exchanges it
|
|
20
|
+
for the final `Ed25519BasicToken` bearer). No new token-minting code.
|
|
21
|
+
|
|
22
|
+
## Type & payload
|
|
23
|
+
|
|
24
|
+
- `AuthenticationType.Supervisor = 'pk-supervisor'` (in `@owlmeans/auth`).
|
|
25
|
+
- Shared signed payload: `buildSupervisorPayload(challenge, userId, salt)` (in `@owlmeans/auth`) —
|
|
26
|
+
binds the signature to the **single-use server challenge** (replay protection), the target
|
|
27
|
+
`userId`, and a fresh client `salt`. The front-end packs `{ salt, signature }` (JSON) into
|
|
28
|
+
`AuthCredentials.credential`.
|
|
29
|
+
|
|
30
|
+
## Server: `appendSupervisorAuth` (from `@owlmeans/server-auth/manager`)
|
|
31
|
+
|
|
32
|
+
Call once on the **auth-manager** context (the one that serves `AUTHEN_INIT`/`AUTHEN_AUTHEN` and holds
|
|
33
|
+
`AUTH_SRV_KEY`), beside other plugin appends (e.g. `appendOtpPlugin`).
|
|
34
|
+
|
|
35
|
+
```ts
|
|
36
|
+
import { appendSupervisorAuth } from '@owlmeans/server-auth/manager'
|
|
37
|
+
|
|
38
|
+
appendSupervisorAuth(context, {
|
|
39
|
+
supervisors: ['master-key', 'super-user', 'shared-key'], // TRUSTED record `name`s allowed to sign
|
|
40
|
+
resolveUser: async (userId, ctx, { register }) => { // find-or-create the target identity
|
|
41
|
+
// wire to your identity store; return { userId, profileId?, entitySlug?, role?, scopes? }
|
|
42
|
+
},
|
|
43
|
+
allowRegistration: true, // default true
|
|
44
|
+
enabled: undefined, // default: development only (cfg.debug.all || cfg.debug.supervisor)
|
|
45
|
+
acceptInternalTokens: true, // default true — see below
|
|
46
|
+
})
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Options:
|
|
50
|
+
- `supervisors` — TRUSTED-record `name`s authorized to sign. Default `['master','superuser']`. The
|
|
51
|
+
matching **public** key must be in the project's TRUSTED config; the **private** key is what the
|
|
52
|
+
front-end signs with. Pick aliases whose private keys you actually have (e.g. in `.env.dev.secrets`).
|
|
53
|
+
- `resolveUser` — `(userId, context, { register }) => Promise<SupervisorUserResolution>`. Default:
|
|
54
|
+
trust the id as-is (`{ userId }`). Wire it to `@owlmeans/server-auth-identity`'s
|
|
55
|
+
`IdentityLinkingService` (`getLinkedProfile` / `linkProfile`) to find-or-create the person's
|
|
56
|
+
account and the deployment's own row (a new address registers a personal organization). `SupervisorUserResolution` is `{ userId }` plus optional `profileId`,
|
|
57
|
+
`entitySlug`, `role` and `scopes` — the organization value is a SLUG, the renameable public name
|
|
58
|
+
that a token carries, never the stable `entityId`. `profileId` defaults to `userId`, `scopes` to
|
|
59
|
+
the credential's own or `[ALL_SCOPES]`, and `role` to `AuthRole.User`.
|
|
60
|
+
- `enabled` — force on/off. Default is development only. **Never enable in real production.**
|
|
61
|
+
- `acceptInternalTokens` — when `true`, appends the internal `Ed25519BasicToken` guard
|
|
62
|
+
(`DEFAULT_GUARD`) as a coguard on every already-guarded backend entrypoint, so internal OwlMeans
|
|
63
|
+
tokens keep working where another guard (OIDC, say) is the primary one. The primary guard stays
|
|
64
|
+
first; the internal guard only matches an `Ed25519BasicToken` authorization header. Also exposed
|
|
65
|
+
standalone as `setupInternalTokenCoguard(entrypoints, guard?)`. Set `false` when the entrypoints
|
|
66
|
+
already use `DEFAULT_GUARD` as their primary guard.
|
|
67
|
+
- `guard` — which guard alias `acceptInternalTokens` appends. Default `DEFAULT_GUARD` (`'auth'`).
|
|
68
|
+
|
|
69
|
+
## Web: `appendSupervisorAuth` (from `@owlmeans/web-auth`)
|
|
70
|
+
|
|
71
|
+
Call once on the web client context. Registers the self-contained login form plugin; the form renders
|
|
72
|
+
at the standard typed route `SUPERVISOR_LOGIN_PATH` = `/authentication/login/pk-supervisor`.
|
|
73
|
+
|
|
74
|
+
```ts
|
|
75
|
+
import { appendSupervisorAuth } from '@owlmeans/web-auth'
|
|
76
|
+
|
|
77
|
+
appendSupervisorAuth(context) // dev-only by default; or appendSupervisorAuth(context, { enabled })
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
The form (`data-testid="supervisor-auth-form"`, inputs `supervisor-user-id`, `supervisor-pk`, button
|
|
81
|
+
`supervisor-submit`, error `supervisor-error`) fetches a challenge, signs it, exchanges it for a
|
|
82
|
+
bearer, stores it, and redirects HOME — mirroring the Google plugin. (Alternatively, the side-effect
|
|
83
|
+
import `@owlmeans/web-auth/auth/plugins` always-registers it.)
|
|
84
|
+
|
|
85
|
+
The web append reads `cfg.debug.supervisor` alone; the server append accepts either
|
|
86
|
+
`cfg.debug.all` or `cfg.debug.supervisor`. A deployment that wants the operator login therefore sets
|
|
87
|
+
`debug.supervisor` — it is the flag both halves honour, and the only one that does not arrive by
|
|
88
|
+
accident. The plugin is `restricted`, so `appendSupervisorAuth` also writes
|
|
89
|
+
`cfg.security.auth.login.overrides` to make it offerable; `{ offer: false }` registers it without
|
|
90
|
+
advertising it.
|
|
91
|
+
|
|
92
|
+
## Tests: `@owlmeans/test-ui` helpers
|
|
93
|
+
|
|
94
|
+
- `supervisorAuthHelper.authenticateViaSupervisorApi({ apiBaseUrl, userId, pk })` — drives the live API
|
|
95
|
+
(`/authentication/init` → sign → `/authentication/authenticate` → `/authenticate`) and returns the
|
|
96
|
+
final bearer. **No browser**; registers the user on first use. The "set a token directly via API" path.
|
|
97
|
+
- `makePageHelper(page).loginViaSupervisorForm({ baseUrl, userId, pk })` — Playwright: drives the real login form
|
|
98
|
+
end-to-end (faithful path that exercises the plugin + registration).
|
|
99
|
+
- `makePageHelper(page).loginViaDispatcher(baseUrl, token)` — inject a pregenerated bearer via the standard
|
|
100
|
+
`/dispatcher?token=` route (apps that override DISPATCHER, e.g. for a forced IdP, can't use this —
|
|
101
|
+
use the form).
|
|
102
|
+
- `supervisorAuthHelper.pregenerateAuthToken({ userId, pk, scopes?, role?, profileId?, source?, ... })` — offline mint via
|
|
103
|
+
`@owlmeans/test-auth`'s `makeBearer`, using the project's **own** trusted signing key (lowest-level
|
|
104
|
+
primitive). No plugin, no registration.
|
|
105
|
+
|
|
106
|
+
`makePageHelper(page).loginViaSupervisorForm` answers a cookie-consent dialog by default (`consent: 'accept'`): an
|
|
107
|
+
OwlMeans app refuses to start an authentication flow until consent is answered, and the modal
|
|
108
|
+
intercepts every click at the form underneath. Both browser helpers navigate with
|
|
109
|
+
`waitUntil: 'domcontentloaded'` rather than Playwright's `load`, because `load` waits for every
|
|
110
|
+
subresource and a tag manager or analytics beacon that never settles holds it open until timeout.
|
|
111
|
+
|
|
112
|
+
## Security
|
|
113
|
+
|
|
114
|
+
- Development/stage only. Gate on `cfg.debug`; never ship enabled to real production.
|
|
115
|
+
- Anyone with a supervisor **private** key can impersonate/register any user — treat those keys as
|
|
116
|
+
highly sensitive.
|
|
117
|
+
|
|
118
|
+
## Depends On
|
|
119
|
+
- `@owlmeans/auth` (type + `buildSupervisorPayload` + `SupervisorCredentialPayload`),
|
|
120
|
+
`@owlmeans/basic-keys` (sign/verify), `@owlmeans/basic-ids` (the salt),
|
|
121
|
+
`@owlmeans/auth-common` (`DEFAULT_GUARD`, `TrustedRecord`), `@owlmeans/config` (`TRUSTED`).
|
|
122
|
+
- Tests: `@owlmeans/test-ui` (the helpers above) over `@owlmeans/test-auth` (`makeBearer`).
|
|
123
|
+
|
|
124
|
+
## Related
|
|
125
|
+
|
|
126
|
+
`server-auth` (the plugin registry and the manager) · `web-auth` (the form package) ·
|
|
127
|
+
`server-auth-identity` (what `resolveUser` should be wired to) · `login-methods` (why a
|
|
128
|
+
`restricted` method has to be named in the configuration)
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { EntrypointProtocol } from '@owlmeans/entrypoint';
|
|
2
2
|
import type { AuthToken } from '@owlmeans/auth';
|
|
3
|
-
export declare const authenticate:
|
|
3
|
+
export declare const authenticate: (protocol: EntrypointProtocol<{
|
|
4
|
+
body: AuthToken;
|
|
5
|
+
}, AuthToken>) => import("@owlmeans/server-entrypoint").BoundEntrypointHandler<EntrypointProtocol<{
|
|
6
|
+
body: AuthToken;
|
|
7
|
+
}, AuthToken>>;
|
|
4
8
|
//# sourceMappingURL=service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../src/actions/service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../src/actions/service.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAM/C,eAAO,MAAM,YAAY,aAAc,kBAAkB,CAAC;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,EAAE,SAAS,CAAC;UAAvB,SAAS;cAKvE,CAAA"}
|
package/build/actions/service.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { handlers } from '@owlmeans/server-api';
|
|
2
2
|
import { assertContext } from '@owlmeans/context';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
const api = handlers();
|
|
4
|
+
export const authenticate = (protocol) => api.request(protocol, async (request, context) => {
|
|
5
|
+
const ctx = assertContext(context, 'authenticate');
|
|
6
|
+
return await ctx.auth().authenticate(request.body);
|
|
6
7
|
});
|
|
7
8
|
//# sourceMappingURL=service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../src/actions/service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../src/actions/service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAG/C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAGjD,MAAM,GAAG,GAAG,QAAQ,EAAW,CAAA;AAE/B,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,QAA4D,EAAE,EAAE,CAC3F,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE;IAC/C,MAAM,GAAG,GAAG,aAAa,CAAC,OAAO,EAAE,cAAc,CAAY,CAAA;IAE7D,OAAO,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;AACpD,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ServerConfig, ServerContext } from '@owlmeans/server-context';
|
|
2
|
+
import { AuthServiceAppend } from '../types.js';
|
|
3
|
+
export type Config = ServerConfig;
|
|
4
|
+
export interface Context extends ServerContext<Config>, AuthServiceAppend {
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=types.local.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.local.d.ts","sourceRoot":"","sources":["../../src/actions/types.local.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAE/C,MAAM,MAAM,MAAM,GAAG,YAAY,CAAA;AAEjC,MAAM,WAAW,OAAQ,SAAQ,aAAa,CAAC,MAAM,CAAC,EAAE,iBAAiB;CAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.local.js","sourceRoot":"","sources":["../../src/actions/types.local.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ServerProtocolEntrypoint } from '@owlmeans/server-entrypoint';
|
|
2
|
+
import type { EntrypointProtocolDeclaration } from '@owlmeans/entrypoint';
|
|
3
|
+
/** Server entrypoints required by the generic authentication service. */
|
|
4
|
+
export declare const entrypoints: ServerProtocolEntrypoint<EntrypointProtocolDeclaration>[];
|
|
5
|
+
//# sourceMappingURL=entrypoints.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entrypoints.d.ts","sourceRoot":"","sources":["../src/entrypoints.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAA;AAE3E,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAA;AAGzE,yEAAyE;AACzE,eAAO,MAAM,WAAW,EAAE,wBAAwB,CAAC,6BAA6B,CAAC,EAGhF,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { bind } from '@owlmeans/server-entrypoint';
|
|
2
|
+
import { authProtocols } from '@owlmeans/auth-common';
|
|
3
|
+
import { authenticate } from './actions/service.js';
|
|
4
|
+
/** Server entrypoints required by the generic authentication service. */
|
|
5
|
+
export const entrypoints = [
|
|
6
|
+
bind(authProtocols.dispatcher),
|
|
7
|
+
bind(authProtocols.dispatcherAuthenticate, authenticate(authProtocols.dispatcherAuthenticate)),
|
|
8
|
+
];
|
|
9
|
+
//# sourceMappingURL=entrypoints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entrypoints.js","sourceRoot":"","sources":["../src/entrypoints.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAA;AAElD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAErD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAEnD,yEAAyE;AACzE,MAAM,CAAC,MAAM,WAAW,GAA8D;IACpF,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC;IAC9B,IAAI,CAAC,aAAa,CAAC,sBAAsB,EAAE,YAAY,CAAC,aAAa,CAAC,sBAAsB,CAAC,CAAC;CAC/F,CAAA"}
|
package/build/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export type * from './types.js';
|
|
2
2
|
export * from './model/index.js';
|
|
3
3
|
export * from './consts.js';
|
|
4
|
-
export * from './
|
|
4
|
+
export * from './entrypoints.js';
|
|
5
5
|
export * from './service.js';
|
|
6
|
+
export * from './re-captcha/index.js';
|
|
6
7
|
//# sourceMappingURL=index.d.ts.map
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,YAAY,CAAA;AAC/B,cAAc,kBAAkB,CAAA;AAChC,cAAc,aAAa,CAAA;AAC3B,cAAc,kBAAkB,CAAA;AAChC,cAAc,cAAc,CAAA;AAC5B,cAAc,uBAAuB,CAAA"}
|
package/build/index.js
CHANGED
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,kBAAkB,CAAA;AAChC,cAAc,aAAa,CAAA;AAC3B,cAAc,kBAAkB,CAAA;AAChC,cAAc,cAAc,CAAA;AAC5B,cAAc,uBAAuB,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AuthCredentials, AuthToken } from '@owlmeans/auth';
|
|
2
|
+
import type { EntrypointProtocol } from '@owlmeans/entrypoint';
|
|
3
|
+
export declare const authenticate: (protocol: EntrypointProtocol<{
|
|
4
|
+
body: AuthCredentials;
|
|
5
|
+
}, AuthToken>) => import("@owlmeans/server-entrypoint").BoundEntrypointHandler<EntrypointProtocol<{
|
|
6
|
+
body: AuthCredentials;
|
|
7
|
+
}, AuthToken>>;
|
|
8
|
+
//# sourceMappingURL=authenticate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authenticate.d.ts","sourceRoot":"","sources":["../../../src/manager/actions/authenticate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAChE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAO9D,eAAO,MAAM,YAAY,aAAc,kBAAkB,CAAC;IAAE,IAAI,EAAE,eAAe,CAAA;CAAE,EAAE,SAAS,CAAC;UAA7B,eAAe;cAGhF,CAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { handlers } from '@owlmeans/server-api';
|
|
2
|
+
import { makeAuthModel } from '../model.js';
|
|
3
|
+
const api = handlers();
|
|
4
|
+
export const authenticate = (protocol) => api.body(protocol, async (body, context) => await makeAuthModel(context).authenticate(body));
|
|
5
|
+
//# sourceMappingURL=authenticate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authenticate.js","sourceRoot":"","sources":["../../../src/manager/actions/authenticate.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAG3C,MAAM,GAAG,GAAG,QAAQ,EAAyB,CAAA;AAE7C,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,QAAkE,EAAE,EAAE,CACjG,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,CAC3C,MAAM,aAAa,CAAC,OAAO,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,CAChD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/manager/actions/index.ts"],"names":[],"mappings":"AACA,cAAc,cAAc,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/manager/actions/index.ts"],"names":[],"mappings":"AACA,cAAc,WAAW,CAAA;AACzB,cAAc,mBAAmB,CAAA;AACjC,cAAc,WAAW,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/manager/actions/index.ts"],"names":[],"mappings":"AACA,cAAc,cAAc,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/manager/actions/index.ts"],"names":[],"mappings":"AACA,cAAc,WAAW,CAAA;AACzB,cAAc,mBAAmB,CAAA;AACjC,cAAc,WAAW,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AllowanceRequest, AllowanceResponse } from '@owlmeans/auth';
|
|
2
|
+
import type { EntrypointProtocol } from '@owlmeans/entrypoint';
|
|
3
|
+
export declare const authenticationInit: (protocol: EntrypointProtocol<{
|
|
4
|
+
body: AllowanceRequest;
|
|
5
|
+
}, AllowanceResponse>) => import("@owlmeans/server-entrypoint").BoundEntrypointHandler<EntrypointProtocol<{
|
|
6
|
+
body: AllowanceRequest;
|
|
7
|
+
}, AllowanceResponse>>;
|
|
8
|
+
//# sourceMappingURL=init.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/manager/actions/init.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AACzE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAO9D,eAAO,MAAM,kBAAkB,aAAc,kBAAkB,CAAC;IAAE,IAAI,EAAE,gBAAgB,CAAA;CAAE,EAAE,iBAAiB,CAAC;UAAtC,gBAAgB;sBAGvF,CAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { handlers } from '@owlmeans/server-api';
|
|
2
|
+
import { makeAuthModel } from '../model.js';
|
|
3
|
+
const api = handlers();
|
|
4
|
+
export const authenticationInit = (protocol) => api.body(protocol, async (body, context) => await makeAuthModel(context).init(body));
|
|
5
|
+
//# sourceMappingURL=init.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../../src/manager/actions/init.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAG3C,MAAM,GAAG,GAAG,QAAQ,EAAyB,CAAA;AAE7C,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,QAA2E,EAAE,EAAE,CAChH,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,CAC3C,MAAM,aAAa,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CACxC,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AuthToken } from '@owlmeans/auth';
|
|
2
|
+
import type { EntrypointProtocol } from '@owlmeans/entrypoint';
|
|
3
|
+
export declare const rely: (protocol: EntrypointProtocol<{
|
|
4
|
+
query: Partial<AuthToken>;
|
|
5
|
+
}, undefined>) => import("@owlmeans/server-entrypoint").BoundEntrypointHandler<EntrypointProtocol<{
|
|
6
|
+
query: Partial<AuthToken>;
|
|
7
|
+
}, undefined>>;
|
|
8
|
+
//# sourceMappingURL=rely.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rely.d.ts","sourceRoot":"","sources":["../../../src/manager/actions/rely.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAK9D,eAAO,MAAM,IAAI,aAAc,kBAAkB,CAAC;IAAE,KAAK,EAAE,OAAO,CAAC,SAAS,CAAC,CAAA;CAAE,EAAE,SAAS,CAAC;WAAhC,OAAO,CAAC,SAAS,CAAC;cAK5E,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { makeAuthModel } from '../model.js';
|
|
2
|
+
import { connection } from '@owlmeans/server-socket';
|
|
3
|
+
export const rely = (protocol) => connection(protocol,
|
|
4
|
+
// @TODO Request will contain information is there requrest
|
|
5
|
+
// privileged or not (privileged request implies auth provider)
|
|
6
|
+
async (conn, context, request) => await makeAuthModel(context).rely(conn, request.auth));
|
|
7
|
+
//# sourceMappingURL=rely.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rely.js","sourceRoot":"","sources":["../../../src/manager/actions/rely.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAE3C,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAEpD,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,QAAsE,EAAE,EAAE,CAAC,UAAU,CAAC,QAAQ;AACjH,4DAA4D;AAC5D,+DAA+D;AAC/D,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,CAC/B,MAAM,aAAa,CAAC,OAAgC,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,CACjF,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consts.local.d.ts","sourceRoot":"","sources":["../../src/manager/consts.local.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,UAA0B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consts.local.js","sourceRoot":"","sources":["../../src/manager/consts.local.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/manager/context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AASvD,eAAO,MAAM,WAAW,GAAI,CAAC,SAAS,SAAS,EAAE,CAAC,SAAS,UAAU,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/manager/context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AASvD,eAAO,MAAM,WAAW,GAAI,CAAC,SAAS,SAAS,EAAE,CAAC,SAAS,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,cAAa,OAAO,KAAW,CAoB9G,CAAA"}
|
package/build/manager/context.js
CHANGED
|
@@ -20,7 +20,6 @@ export const makeContext = (cfg, customize = false) => {
|
|
|
20
20
|
if (!customize && !context.hasResource(AUTH_CACHE)) {
|
|
21
21
|
appendStaticResource(context, AUTH_CACHE);
|
|
22
22
|
}
|
|
23
|
-
context.makeContext = (cfg => makeContext(cfg, customize));
|
|
24
23
|
return context;
|
|
25
24
|
};
|
|
26
25
|
//# sourceMappingURL=context.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/manager/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAE5D,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAC/C,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAA;AACrF,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAEhE,MAAM,CAAC,MAAM,WAAW,GAAG,CAA+C,GAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/manager/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAE5D,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAC/C,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAA;AACrF,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAEhE,MAAM,CAAC,MAAM,WAAW,GAAG,CAA+C,GAAM,EAAE,SAAS,GAAY,KAAK,EAAK,EAAE;IACjH,MAAM,OAAO,GAAG,iBAAiB,CAAC,GAAG,CAAM,CAAA;IAE3C,eAAe,CAAO,OAAO,CAAC,CAAA;IAC9B,eAAe,CAAO,OAAO,CAAC,CAAA;IAC9B,mBAAmB,CAAO,OAAO,CAAC,CAAA;IAElC,OAAO,CAAC,kBAAkB,CAAC,sBAAsB,EAAE,CAAC,CAAA;IAEpD,4CAA4C;IAC5C,IAAI,CAAC,SAAS,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;QACpD,OAAO,CAAC,eAAe,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC,CAAA;IAC1D,CAAC;IAED,oBAAoB,CAAO,OAAO,CAAC,CAAA;IACnC,IAAI,CAAC,SAAS,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE,CAAC;QACnD,oBAAoB,CAAO,OAAO,EAAE,UAAU,CAAC,CAAA;IACjD,CAAC;IAED,OAAO,OAAY,CAAA;AACrB,CAAC,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Server entrypoints for the full authentication manager. */
|
|
2
|
+
export declare const entrypoints: (import("@owlmeans/server-entrypoint").ServerProtocolEntrypoint<import("@owlmeans/entrypoint").EntrypointProtocol<import("@owlmeans/entrypoint").OpenRequest, import("@owlmeans/entrypoint").OpenValue>> | import("@owlmeans/server-entrypoint").ServerProtocolEntrypoint<import("@owlmeans/entrypoint").EntrypointProtocol<{
|
|
3
|
+
body: import("@owlmeans/auth").AllowanceRequest;
|
|
4
|
+
}, import("@owlmeans/auth").AllowanceResponse>> | import("@owlmeans/server-entrypoint").ServerProtocolEntrypoint<import("@owlmeans/entrypoint").EntrypointProtocol<{
|
|
5
|
+
body: import("@owlmeans/auth").AuthCredentials;
|
|
6
|
+
}, import("@owlmeans/auth").AuthToken>> | import("@owlmeans/server-entrypoint").ServerProtocolEntrypoint<import("@owlmeans/entrypoint").EntrypointProtocol<{
|
|
7
|
+
query: Partial<import("@owlmeans/auth").AuthToken>;
|
|
8
|
+
}, undefined>>)[];
|
|
9
|
+
//# sourceMappingURL=entrypoints.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entrypoints.d.ts","sourceRoot":"","sources":["../../src/manager/entrypoints.ts"],"names":[],"mappings":"AASA,8DAA8D;AAC9D,eAAO,MAAM,WAAW;;;;;;iBAMvB,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { authProtocols } from '@owlmeans/auth-common';
|
|
2
|
+
import { entrypoints as apiConfigBindings } from '@owlmeans/api-config-server';
|
|
3
|
+
import { bind } from '@owlmeans/server-entrypoint';
|
|
4
|
+
import { decorateEntrypoint } from '@owlmeans/entrypoint';
|
|
5
|
+
import * as actions from './actions/index.js';
|
|
6
|
+
import { DEFAULT_RELY } from './consts.js';
|
|
7
|
+
const relyProtocol = decorateEntrypoint(authProtocols.rely, { guards: DEFAULT_RELY });
|
|
8
|
+
/** Server entrypoints for the full authentication manager. */
|
|
9
|
+
export const entrypoints = [
|
|
10
|
+
bind(authProtocols.authen, undefined, { intermediate: true }),
|
|
11
|
+
bind(authProtocols.init, actions.authenticationInit(authProtocols.init)),
|
|
12
|
+
bind(authProtocols.authenticate, actions.authenticate(authProtocols.authenticate)),
|
|
13
|
+
bind(relyProtocol, actions.rely(relyProtocol)),
|
|
14
|
+
...apiConfigBindings,
|
|
15
|
+
];
|
|
16
|
+
//# sourceMappingURL=entrypoints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entrypoints.js","sourceRoot":"","sources":["../../src/manager/entrypoints.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AACrD,OAAO,EAAE,WAAW,IAAI,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;AAC9E,OAAO,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAA;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAA;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE1C,MAAM,YAAY,GAAG,kBAAkB,CAAC,aAAa,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,CAAA;AAErF,8DAA8D;AAC9D,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,SAAS,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC;IAC7D,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,OAAO,CAAC,kBAAkB,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IACxE,IAAI,CAAC,aAAa,CAAC,YAAY,EAAE,OAAO,CAAC,YAAY,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;IAClF,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAC9C,GAAG,iBAAiB;CACrB,CAAA"}
|
|
@@ -4,8 +4,7 @@ export { addWebService } from '@owlmeans/client-config';
|
|
|
4
4
|
export { service, TRUSTED } from '@owlmeans/config';
|
|
5
5
|
export { AppType, assertContext } from '@owlmeans/context';
|
|
6
6
|
export { klusterize } from '@owlmeans/kluster';
|
|
7
|
-
export {
|
|
8
|
-
export { elevate as celevate, stab } from '@owlmeans/client-entrypoint';
|
|
7
|
+
export { stab } from '@owlmeans/client-entrypoint';
|
|
9
8
|
export type { RefedEntrypointHandler } from '@owlmeans/server-entrypoint';
|
|
10
9
|
export { handleIntermediate, handleBody, handleRequest, handleParams } from '@owlmeans/server-api';
|
|
11
10
|
export type { AbstractRequest, AbstractResponse } from '@owlmeans/entrypoint';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exports.d.ts","sourceRoot":"","sources":["../../src/manager/exports.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAA;AACjD,YAAY,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACvD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"exports.d.ts","sourceRoot":"","sources":["../../src/manager/exports.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAA;AACjD,YAAY,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACvD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAA;AAClD,YAAY,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AACzE,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAClG,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAC7E,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAEzC,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AACnE,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA"}
|
package/build/manager/exports.js
CHANGED
|
@@ -3,8 +3,7 @@ export { addWebService } from '@owlmeans/client-config';
|
|
|
3
3
|
export { service, TRUSTED } from '@owlmeans/config';
|
|
4
4
|
export { AppType, assertContext } from '@owlmeans/context';
|
|
5
5
|
export { klusterize } from '@owlmeans/kluster';
|
|
6
|
-
export {
|
|
7
|
-
export { elevate as celevate, stab } from '@owlmeans/client-entrypoint';
|
|
6
|
+
export { stab } from '@owlmeans/client-entrypoint';
|
|
8
7
|
export { handleIntermediate, handleBody, handleRequest, handleParams } from '@owlmeans/server-api';
|
|
9
8
|
export { backend } from '@owlmeans/route';
|
|
10
9
|
export { AUTHEN, AUTHEN_AUTHEN, AUTHEN_INIT } from '@owlmeans/auth';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exports.js","sourceRoot":"","sources":["../../src/manager/exports.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAA;AAEjD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACvD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"exports.js","sourceRoot":"","sources":["../../src/manager/exports.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAA;AAEjD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACvD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAA;AAElD,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAElG,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAEzC,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AACnE,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA"}
|
package/build/manager/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/manager/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,YAAY,CAAA;AAE/B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/manager/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,YAAY,CAAA;AAE/B,cAAc,kBAAkB,CAAA;AAChC,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA;AACzB,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,cAAc,iBAAiB,CAAA"}
|
package/build/manager/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/manager/index.ts"],"names":[],"mappings":"AAEA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/manager/index.ts"],"names":[],"mappings":"AAEA,cAAc,kBAAkB,CAAA;AAChC,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA;AACzB,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,cAAc,iBAAiB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/manager/main.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAEvD,eAAO,MAAM,IAAI,GAAU,CAAC,SAAS,SAAS,EAAE,CAAC,SAAS,UAAU,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/manager/main.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAEvD,eAAO,MAAM,IAAI,GAAU,CAAC,SAAS,SAAS,EAAE,CAAC,SAAS,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,kBAI9E,CAAA"}
|
package/build/manager/main.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { entrypoints } from './entrypoints.js';
|
|
2
2
|
export const main = async (ctx) => {
|
|
3
|
-
ctx.registerEntrypoints(
|
|
3
|
+
ctx.registerEntrypoints(entrypoints);
|
|
4
4
|
await ctx.configure().init();
|
|
5
5
|
await ctx.getApiServer().listen();
|
|
6
6
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../src/manager/main.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../src/manager/main.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAG9C,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,EAAgD,GAAM,EAAE,EAAE;IACjF,GAAG,CAAC,mBAAmB,CAAC,WAAW,CAAC,CAAA;IACpC,MAAM,GAAG,CAAC,SAAS,EAAE,CAAC,IAAI,EAAE,CAAA;IAC5B,MAAM,GAAG,CAAC,YAAY,EAAE,CAAC,MAAM,EAAE,CAAA;AACnC,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../src/manager/model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../src/manager/model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAwBlE,eAAO,MAAM,aAAa,YAAa,UAAU,CAAC,SAAS,CAAC,KAAG,SA6G9D,CAAA"}
|