@owlmeans/web-auth 0.1.14
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/LICENSE +21 -0
- package/README.md +16 -0
- package/agent-meta/instructions/web-auth.instructions.md +22 -0
- package/agent-meta/manifest.json +23 -0
- package/agent-meta/skills/web-auth/SKILL.md +42 -0
- package/build/append.d.ts +19 -0
- package/build/append.d.ts.map +1 -0
- package/build/append.js +19 -0
- package/build/append.js.map +1 -0
- package/build/auth/plugins/index.d.ts +6 -0
- package/build/auth/plugins/index.d.ts.map +1 -0
- package/build/auth/plugins/index.js +10 -0
- package/build/auth/plugins/index.js.map +1 -0
- package/build/auth/plugins/supervisor.d.ts +15 -0
- package/build/auth/plugins/supervisor.d.ts.map +1 -0
- package/build/auth/plugins/supervisor.js +64 -0
- package/build/auth/plugins/supervisor.js.map +1 -0
- package/build/consts.d.ts +8 -0
- package/build/consts.d.ts.map +1 -0
- package/build/consts.js +9 -0
- package/build/consts.js.map +1 -0
- package/build/index.d.ts +4 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +4 -0
- package/build/index.js.map +1 -0
- package/package.json +54 -0
- package/src/append.ts +30 -0
- package/src/auth/plugins/index.ts +11 -0
- package/src/auth/plugins/supervisor.tsx +96 -0
- package/src/consts.ts +9 -0
- package/src/index.ts +3 -0
- package/tsconfig.json +11 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 OwlMeans Common — Fullstack typescript framework
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<!-- owlmeans:agent-guidance:start -->
|
|
2
|
+
## Agent guidance
|
|
3
|
+
|
|
4
|
+
This package ships embedded Claude Code skills and GitHub Copilot instructions under
|
|
5
|
+
`agent-meta/`. After installing your `@owlmeans/*` packages, run the OwlMeans
|
|
6
|
+
agent-skills installer to place them into your project's native locations
|
|
7
|
+
(`.claude/skills/` and `.github/instructions/`):
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
npx @owlmeans/agent-skills
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
The embedded files are version-matched to this package release. Do not edit them
|
|
14
|
+
directly — they are regenerated on each publish. To contribute guidance edits,
|
|
15
|
+
open a PR against the source monorepo.
|
|
16
|
+
<!-- owlmeans:agent-guidance:end -->
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "How to use @owlmeans/web-auth — web auth UI plugins registering into @owlmeans/client-auth/manager. Ships the development-only PK-based supervisor login form via appendSupervisorAuth. Use when adding the supervisor login UI to a web app."
|
|
3
|
+
applyTo: "**/*.ts, **/*.tsx"
|
|
4
|
+
---
|
|
5
|
+
<!-- AUTO-GENERATED — do not edit. Regenerate via sync-agent-meta. -->
|
|
6
|
+
|
|
7
|
+
# @owlmeans/web-auth
|
|
8
|
+
|
|
9
|
+
Web-side auth UI plugins that register into `@owlmeans/client-auth/manager` (mirrors
|
|
10
|
+
`@owlmeans/web-oidc-rp`). Currently ships the **development-only PK-based supervisor** login form.
|
|
11
|
+
|
|
12
|
+
```ts
|
|
13
|
+
import { appendSupervisorAuth } from '@owlmeans/web-auth'
|
|
14
|
+
appendSupervisorAuth(context) // in web makeContext(); dev-only by default (cfg.debug)
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
- Form renders at `SUPERVISOR_LOGIN_PATH` (`/authentication/login/pk-supervisor`) via the standard
|
|
18
|
+
typed auth route — no extra route registration.
|
|
19
|
+
- Side-effect always-on alternative: `import '@owlmeans/web-auth/auth/plugins'`.
|
|
20
|
+
- Test ids: `supervisor-auth-form`, `supervisor-user-id`, `supervisor-pk`, `supervisor-submit`,
|
|
21
|
+
`supervisor-error`.
|
|
22
|
+
- Full feature (server side, options, security, test helpers): see the **supervisor-auth** instruction.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"package": "@owlmeans/web-auth",
|
|
4
|
+
"version": "0.1.14",
|
|
5
|
+
"generatedAt": "2026-08-05T16:56:53.378Z",
|
|
6
|
+
"canonicalRepo": "https://github.com/owlmeans/common",
|
|
7
|
+
"entries": [
|
|
8
|
+
{
|
|
9
|
+
"kind": "skill",
|
|
10
|
+
"name": "web-auth",
|
|
11
|
+
"category": "package-specific",
|
|
12
|
+
"file": "skills/web-auth/SKILL.md",
|
|
13
|
+
"canonicalPath": ".claude/skills/web-auth/SKILL.md"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"kind": "instruction",
|
|
17
|
+
"name": "web-auth",
|
|
18
|
+
"category": "package-specific",
|
|
19
|
+
"file": "instructions/web-auth.instructions.md",
|
|
20
|
+
"canonicalPath": ".github/instructions/web-auth.instructions.md"
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: web-auth
|
|
3
|
+
description: How to use @owlmeans/web-auth — web client auth plugins that register into @owlmeans/client-auth/manager. Currently ships the development-only PK-based supervisor login form (appendSupervisorAuth). Auto-invoked when importing @owlmeans/web-auth.
|
|
4
|
+
user-invocable: false
|
|
5
|
+
---
|
|
6
|
+
<!-- AUTO-GENERATED — do not edit. Regenerate via sync-agent-meta. -->
|
|
7
|
+
|
|
8
|
+
# @owlmeans/web-auth
|
|
9
|
+
|
|
10
|
+
**Layer:** Web
|
|
11
|
+
**Install:** `"@owlmeans/web-auth": "^0.1.14"` in `dependencies`
|
|
12
|
+
|
|
13
|
+
Web-side auth UI plugins that register into the shared `@owlmeans/client-auth/manager` plugin registry
|
|
14
|
+
(mirrors `@owlmeans/web-oidc-rp`). Currently ships the **PK-based supervisor** login form.
|
|
15
|
+
|
|
16
|
+
## Key Exports
|
|
17
|
+
|
|
18
|
+
| Export | Description |
|
|
19
|
+
|--------|-------------|
|
|
20
|
+
| `appendSupervisorAuth(context, opts?)` | Dev-only: register the supervisor login form plugin |
|
|
21
|
+
| `SUPERVISOR_LOGIN_PATH` | `/authentication/login/pk-supervisor` (the typed-route path) |
|
|
22
|
+
| `supervisorClientPlugin` | The client `AuthenticationPlugin` (self-contained form) |
|
|
23
|
+
|
|
24
|
+
## Subpath Exports
|
|
25
|
+
- `./auth/plugins` — side-effect import that always-registers the supervisor plugin
|
|
26
|
+
(`import '@owlmeans/web-auth/auth/plugins'`). Prefer the dev-gated `appendSupervisorAuth`.
|
|
27
|
+
|
|
28
|
+
## Usage
|
|
29
|
+
```ts
|
|
30
|
+
import { appendSupervisorAuth } from '@owlmeans/web-auth'
|
|
31
|
+
// in your web client makeContext():
|
|
32
|
+
appendSupervisorAuth(context) // enabled in development only (cfg.debug)
|
|
33
|
+
```
|
|
34
|
+
The form renders at `SUPERVISOR_LOGIN_PATH` via the standard `CAUTHEN_AUTHEN_TYPED` route — no extra
|
|
35
|
+
route registration needed. Test ids: `supervisor-auth-form`, `supervisor-user-id`, `supervisor-pk`,
|
|
36
|
+
`supervisor-submit`, `supervisor-error`.
|
|
37
|
+
|
|
38
|
+
See the **supervisor-auth** skill for the full feature (server append, options, security, test helpers).
|
|
39
|
+
|
|
40
|
+
## Depends On
|
|
41
|
+
- `@owlmeans/client-auth`, `@owlmeans/web-client`, `@owlmeans/client`
|
|
42
|
+
- `@owlmeans/auth` (type + `buildSupervisorPayload`), `@owlmeans/basic-keys`, `@owlmeans/basic-ids`
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface WebSupervisorAuthOptions {
|
|
2
|
+
/** Force enable/disable. Default: development only (cfg.debug.all || cfg.debug.supervisor). */
|
|
3
|
+
enabled?: boolean;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Unified, explicit append for the PK-based supervisor login UI. Call it once on
|
|
7
|
+
* the web client context. Development-only by default. It registers the
|
|
8
|
+
* supervisor client plugin so the form is rendered by the standard typed
|
|
9
|
+
* authentication route at {@link SUPERVISOR_LOGIN_PATH}.
|
|
10
|
+
*/
|
|
11
|
+
export declare const appendSupervisorAuth: <T extends {
|
|
12
|
+
cfg: {
|
|
13
|
+
debug?: {
|
|
14
|
+
all?: boolean;
|
|
15
|
+
supervisor?: boolean;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
}>(context: T, opts?: WebSupervisorAuthOptions) => T;
|
|
19
|
+
//# sourceMappingURL=append.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"append.d.ts","sourceRoot":"","sources":["../src/append.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,wBAAwB;IACvC,+FAA+F;IAC/F,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAKD;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,GAAI,CAAC,SAAS;IAAE,GAAG,EAAE;QAAE,KAAK,CAAC,EAAE;YAAE,GAAG,CAAC,EAAE,OAAO,CAAC;YAAC,UAAU,CAAC,EAAE,OAAO,CAAA;SAAE,CAAA;KAAE,CAAA;CAAE,EACzG,SAAS,CAAC,EAAE,OAAO,wBAAwB,KAC1C,CASF,CAAA"}
|
package/build/append.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AuthenticationType } from '@owlmeans/auth';
|
|
2
|
+
import { plugins as authPlugins } from '@owlmeans/client-auth/manager';
|
|
3
|
+
import { supervisorClientPlugin } from './auth/plugins/supervisor.js';
|
|
4
|
+
const isDevelopment = (context) => context.cfg.debug?.all === true || context.cfg.debug?.supervisor === true;
|
|
5
|
+
/**
|
|
6
|
+
* Unified, explicit append for the PK-based supervisor login UI. Call it once on
|
|
7
|
+
* the web client context. Development-only by default. It registers the
|
|
8
|
+
* supervisor client plugin so the form is rendered by the standard typed
|
|
9
|
+
* authentication route at {@link SUPERVISOR_LOGIN_PATH}.
|
|
10
|
+
*/
|
|
11
|
+
export const appendSupervisorAuth = (context, opts) => {
|
|
12
|
+
const enabled = opts?.enabled ?? isDevelopment(context);
|
|
13
|
+
if (!enabled) {
|
|
14
|
+
return context;
|
|
15
|
+
}
|
|
16
|
+
authPlugins[AuthenticationType.Supervisor] = supervisorClientPlugin;
|
|
17
|
+
return context;
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=append.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"append.js","sourceRoot":"","sources":["../src/append.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AACnD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,+BAA+B,CAAA;AACtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAA;AAOrE,MAAM,aAAa,GAAG,CAAC,OAAqE,EAAW,EAAE,CACvG,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAA;AAE3E;;;;;GAKG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAClC,OAAU,EAAE,IAA+B,EACxC,EAAE;IACL,MAAM,OAAO,GAAG,IAAI,EAAE,OAAO,IAAI,aAAa,CAAC,OAAO,CAAC,CAAA;IACvD,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,OAAO,CAAA;IAChB,CAAC;IAED,WAAW,CAAC,kBAAkB,CAAC,UAAU,CAAC,GAAG,sBAAsB,CAAA;IAEnE,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/auth/plugins/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAA;AAOxD,eAAO,MAAM,OAAO;;CAAc,CAAA;AAClC,OAAO,EAAE,sBAAsB,EAAE,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { plugins as authPlugins } from '@owlmeans/client-auth/manager';
|
|
2
|
+
import { AuthenticationType } from '@owlmeans/auth';
|
|
3
|
+
import { supervisorClientPlugin } from './supervisor.js';
|
|
4
|
+
// Side-effect registration into the shared client auth plugin registry. Prefer
|
|
5
|
+
// the dev-gated `appendSupervisorAuth` for explicit, environment-aware wiring;
|
|
6
|
+
// this import is the always-on alternative (mirrors @owlmeans/web-oidc-rp).
|
|
7
|
+
authPlugins[AuthenticationType.Supervisor] = supervisorClientPlugin;
|
|
8
|
+
export const plugins = authPlugins;
|
|
9
|
+
export { supervisorClientPlugin };
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/auth/plugins/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,+BAA+B,CAAA;AACtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAA;AAExD,+EAA+E;AAC/E,+EAA+E;AAC/E,4EAA4E;AAC5E,WAAW,CAAC,kBAAkB,CAAC,UAAU,CAAC,GAAG,sBAAsB,CAAA;AAEnE,MAAM,CAAC,MAAM,OAAO,GAAG,WAAW,CAAA;AAClC,OAAO,EAAE,sBAAsB,EAAE,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { AuthenticationPlugin } from '@owlmeans/client-auth/manager/plugins';
|
|
2
|
+
/**
|
|
3
|
+
* PK-based supervisor login form (development-only). The operator (or an e2e
|
|
4
|
+
* test) enters a target user id / email and one of the project's trusted private
|
|
5
|
+
* keys. The form generates a fresh session salt, signs `buildSupervisorPayload`
|
|
6
|
+
* with the entered key, and hands the packed credential to the standard auth
|
|
7
|
+
* control - the back-end supervisor plugin verifies the signature and mints a
|
|
8
|
+
* regular owlmeans token for the user.
|
|
9
|
+
*
|
|
10
|
+
* The plugin is self-contained: it renders its own minimal form and performs the
|
|
11
|
+
* token storage + redirect (mirroring the Google plugin), so a host app only has
|
|
12
|
+
* to register it (see web `appendSupervisorAuth`).
|
|
13
|
+
*/
|
|
14
|
+
export declare const supervisorClientPlugin: AuthenticationPlugin;
|
|
15
|
+
//# sourceMappingURL=supervisor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"supervisor.d.ts","sourceRoot":"","sources":["../../../src/auth/plugins/supervisor.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAA;AAWjF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,sBAAsB,EAAE,oBAsEpC,CAAA"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { AuthenticationType, buildSupervisorPayload } from '@owlmeans/auth';
|
|
4
|
+
import { DEFAULT_ALIAS as AUTH_SERVICE } from '@owlmeans/client-auth';
|
|
5
|
+
import { useContext } from '@owlmeans/client';
|
|
6
|
+
import { HOME } from '@owlmeans/web-client';
|
|
7
|
+
import { makeKeyPairModel } from '@owlmeans/basic-keys';
|
|
8
|
+
import { createIdOfLength } from '@owlmeans/basic-ids';
|
|
9
|
+
/**
|
|
10
|
+
* PK-based supervisor login form (development-only). The operator (or an e2e
|
|
11
|
+
* test) enters a target user id / email and one of the project's trusted private
|
|
12
|
+
* keys. The form generates a fresh session salt, signs `buildSupervisorPayload`
|
|
13
|
+
* with the entered key, and hands the packed credential to the standard auth
|
|
14
|
+
* control - the back-end supervisor plugin verifies the signature and mints a
|
|
15
|
+
* regular owlmeans token for the user.
|
|
16
|
+
*
|
|
17
|
+
* The plugin is self-contained: it renders its own minimal form and performs the
|
|
18
|
+
* token storage + redirect (mirroring the Google plugin), so a host app only has
|
|
19
|
+
* to register it (see web `appendSupervisorAuth`).
|
|
20
|
+
*/
|
|
21
|
+
export const supervisorClientPlugin = {
|
|
22
|
+
type: AuthenticationType.Supervisor,
|
|
23
|
+
Implementation: () => ({ type, control }) => {
|
|
24
|
+
const context = useContext();
|
|
25
|
+
const [userId, setUserId] = useState('');
|
|
26
|
+
const [pk, setPk] = useState('');
|
|
27
|
+
const [error, setError] = useState(null);
|
|
28
|
+
const [busy, setBusy] = useState(false);
|
|
29
|
+
const onSubmit = async (event) => {
|
|
30
|
+
event.preventDefault();
|
|
31
|
+
setError(null);
|
|
32
|
+
setBusy(true);
|
|
33
|
+
try {
|
|
34
|
+
// Fetch a fresh server challenge right before signing so the allowance is
|
|
35
|
+
// always ready (avoids a race when the form is submitted immediately).
|
|
36
|
+
await control.requestAllowence({ type });
|
|
37
|
+
const token = await control.authenticate({ userId, credential: pk });
|
|
38
|
+
if (token.token !== '') {
|
|
39
|
+
const authService = context.service(AUTH_SERVICE);
|
|
40
|
+
await authService.authenticate(token);
|
|
41
|
+
}
|
|
42
|
+
const [homeUrl] = await context.module(HOME).call({ full: true }) ?? [];
|
|
43
|
+
window.location.href = homeUrl ?? window.location.origin;
|
|
44
|
+
}
|
|
45
|
+
catch (e) {
|
|
46
|
+
setError(e instanceof Error ? e.message : String(e));
|
|
47
|
+
setBusy(false);
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
return (_jsxs("form", { onSubmit: onSubmit, "data-testid": "supervisor-auth-form", style: { display: 'flex', flexDirection: 'column', gap: 12, maxWidth: 420, margin: '0 auto' }, children: [_jsx("h3", { children: "Supervisor sign-in (development)" }), _jsxs("label", { style: { display: 'flex', flexDirection: 'column', gap: 4 }, children: ["User id / email", _jsx("input", { name: "userId", type: "text", autoComplete: "off", value: userId, "data-testid": "supervisor-user-id", onChange: e => setUserId(e.target.value), required: true })] }), _jsxs("label", { style: { display: 'flex', flexDirection: 'column', gap: 4 }, children: ["Primary key", _jsx("input", { name: "pk", type: "password", autoComplete: "off", value: pk, "data-testid": "supervisor-pk", onChange: e => setPk(e.target.value), required: true })] }), _jsx("button", { type: "submit", "data-testid": "supervisor-submit", disabled: busy || userId === '' || pk === '', children: busy ? 'Signing in…' : 'Sign in as supervisor' }), error != null ? _jsx("p", { role: "alert", "data-testid": "supervisor-error", style: { color: 'crimson' }, children: error }) : null] }));
|
|
51
|
+
},
|
|
52
|
+
// Sign the supervisor payload with the entered private key and pack the salt +
|
|
53
|
+
// signature into `credential`. `credentials.challenge` here is the unwrapped,
|
|
54
|
+
// single-use server challenge (set by the auth control before this runs).
|
|
55
|
+
authenticate: async (credentials) => {
|
|
56
|
+
const key = makeKeyPairModel(credentials.credential);
|
|
57
|
+
const salt = createIdOfLength(16);
|
|
58
|
+
const signature = await key.sign(buildSupervisorPayload(credentials.challenge ?? '', credentials.userId, salt));
|
|
59
|
+
credentials.credential = JSON.stringify({ salt, signature });
|
|
60
|
+
// The real token is issued by the backend via the standard auth control flow.
|
|
61
|
+
return { token: '' };
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=supervisor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"supervisor.js","sourceRoot":"","sources":["../../../src/auth/plugins/supervisor.tsx"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Front-end path that renders the supervisor login form. It reuses the standard
|
|
3
|
+
* typed authentication route (`/authentication/login/:type`, alias
|
|
4
|
+
* `CAUTHEN_AUTHEN_TYPED`) with the supervisor type, so no extra route
|
|
5
|
+
* registration is required - registering the client plugin is enough.
|
|
6
|
+
*/
|
|
7
|
+
export declare const SUPERVISOR_LOGIN_PATH = "/authentication/login/pk-supervisor";
|
|
8
|
+
//# sourceMappingURL=consts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,wCAA2D,CAAA"}
|
package/build/consts.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AuthenticationType } from '@owlmeans/auth';
|
|
2
|
+
/**
|
|
3
|
+
* Front-end path that renders the supervisor login form. It reuses the standard
|
|
4
|
+
* typed authentication route (`/authentication/login/:type`, alias
|
|
5
|
+
* `CAUTHEN_AUTHEN_TYPED`) with the supervisor type, so no extra route
|
|
6
|
+
* registration is required - registering the client plugin is enough.
|
|
7
|
+
*/
|
|
8
|
+
export const SUPERVISOR_LOGIN_PATH = `/authentication/login/${AuthenticationType.Supervisor}`;
|
|
9
|
+
//# sourceMappingURL=consts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consts.js","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAEnD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,yBAAyB,kBAAkB,CAAC,UAAU,EAAE,CAAA"}
|
package/build/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAA"}
|
package/build/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAA"}
|
package/package.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@owlmeans/web-auth",
|
|
3
|
+
"version": "0.1.14",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"build": "tsc -b",
|
|
8
|
+
"dev": "sleep 384 && nodemon -e ts,tsx,json --watch src --exec \"tsc -p ./tsconfig.json\"",
|
|
9
|
+
"watch": "tsc -b -w --preserveWatchOutput --pretty",
|
|
10
|
+
"test": "bun test ./tests"
|
|
11
|
+
},
|
|
12
|
+
"main": "build/index.js",
|
|
13
|
+
"module": "build/index.js",
|
|
14
|
+
"types": "build/index.d.ts",
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"import": "./build/index.js",
|
|
18
|
+
"require": "./build/index.js",
|
|
19
|
+
"default": "./build/index.js",
|
|
20
|
+
"module": "./build/index.js",
|
|
21
|
+
"types": "./build/index.d.ts"
|
|
22
|
+
},
|
|
23
|
+
"./auth/plugins": {
|
|
24
|
+
"import": "./build/auth/plugins/index.js",
|
|
25
|
+
"require": "./build/auth/plugins/index.js",
|
|
26
|
+
"default": "./build/auth/plugins/index.js",
|
|
27
|
+
"module": "./build/auth/plugins/index.js",
|
|
28
|
+
"types": "./build/auth/plugins/index.d.ts"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@owlmeans/auth": "^0.1.14",
|
|
33
|
+
"@owlmeans/auth-common": "^0.1.14",
|
|
34
|
+
"@owlmeans/basic-ids": "^0.1.14",
|
|
35
|
+
"@owlmeans/basic-keys": "^0.1.14",
|
|
36
|
+
"@owlmeans/client": "^0.1.14",
|
|
37
|
+
"@owlmeans/client-auth": "^0.1.14",
|
|
38
|
+
"@owlmeans/context": "^0.1.14",
|
|
39
|
+
"@owlmeans/web-client": "^0.1.14"
|
|
40
|
+
},
|
|
41
|
+
"peerDependencies": {
|
|
42
|
+
"react": "*"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@owlmeans/dep-config": "workspace:*",
|
|
46
|
+
"@types/bun": "^1.3.14",
|
|
47
|
+
"@types/react": "^19.2.17",
|
|
48
|
+
"nodemon": "^3.1.14",
|
|
49
|
+
"typescript": "^6.0.3"
|
|
50
|
+
},
|
|
51
|
+
"publishConfig": {
|
|
52
|
+
"access": "public"
|
|
53
|
+
}
|
|
54
|
+
}
|
package/src/append.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { AuthenticationType } from '@owlmeans/auth'
|
|
2
|
+
import { plugins as authPlugins } from '@owlmeans/client-auth/manager'
|
|
3
|
+
import { supervisorClientPlugin } from './auth/plugins/supervisor.js'
|
|
4
|
+
|
|
5
|
+
export interface WebSupervisorAuthOptions {
|
|
6
|
+
/** Force enable/disable. Default: development only (cfg.debug.all || cfg.debug.supervisor). */
|
|
7
|
+
enabled?: boolean
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const isDevelopment = (context: { cfg: { debug?: { all?: boolean, supervisor?: boolean } } }): boolean =>
|
|
11
|
+
context.cfg.debug?.all === true || context.cfg.debug?.supervisor === true
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Unified, explicit append for the PK-based supervisor login UI. Call it once on
|
|
15
|
+
* the web client context. Development-only by default. It registers the
|
|
16
|
+
* supervisor client plugin so the form is rendered by the standard typed
|
|
17
|
+
* authentication route at {@link SUPERVISOR_LOGIN_PATH}.
|
|
18
|
+
*/
|
|
19
|
+
export const appendSupervisorAuth = <T extends { cfg: { debug?: { all?: boolean, supervisor?: boolean } } }>(
|
|
20
|
+
context: T, opts?: WebSupervisorAuthOptions
|
|
21
|
+
): T => {
|
|
22
|
+
const enabled = opts?.enabled ?? isDevelopment(context)
|
|
23
|
+
if (!enabled) {
|
|
24
|
+
return context
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
authPlugins[AuthenticationType.Supervisor] = supervisorClientPlugin
|
|
28
|
+
|
|
29
|
+
return context
|
|
30
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { plugins as authPlugins } from '@owlmeans/client-auth/manager'
|
|
2
|
+
import { AuthenticationType } from '@owlmeans/auth'
|
|
3
|
+
import { supervisorClientPlugin } from './supervisor.js'
|
|
4
|
+
|
|
5
|
+
// Side-effect registration into the shared client auth plugin registry. Prefer
|
|
6
|
+
// the dev-gated `appendSupervisorAuth` for explicit, environment-aware wiring;
|
|
7
|
+
// this import is the always-on alternative (mirrors @owlmeans/web-oidc-rp).
|
|
8
|
+
authPlugins[AuthenticationType.Supervisor] = supervisorClientPlugin
|
|
9
|
+
|
|
10
|
+
export const plugins = authPlugins
|
|
11
|
+
export { supervisorClientPlugin }
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { useState } from 'react'
|
|
2
|
+
import type { FormEvent } from 'react'
|
|
3
|
+
import type { AuthenticationPlugin } from '@owlmeans/client-auth/manager/plugins'
|
|
4
|
+
import { AuthenticationType, buildSupervisorPayload } from '@owlmeans/auth'
|
|
5
|
+
import type { AuthToken } from '@owlmeans/auth'
|
|
6
|
+
import { DEFAULT_ALIAS as AUTH_SERVICE } from '@owlmeans/client-auth'
|
|
7
|
+
import type { AuthService } from '@owlmeans/auth-common'
|
|
8
|
+
import { useContext } from '@owlmeans/client'
|
|
9
|
+
import { HOME } from '@owlmeans/web-client'
|
|
10
|
+
import type { Module } from '@owlmeans/web-client'
|
|
11
|
+
import { makeKeyPairModel } from '@owlmeans/basic-keys'
|
|
12
|
+
import { createIdOfLength } from '@owlmeans/basic-ids'
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* PK-based supervisor login form (development-only). The operator (or an e2e
|
|
16
|
+
* test) enters a target user id / email and one of the project's trusted private
|
|
17
|
+
* keys. The form generates a fresh session salt, signs `buildSupervisorPayload`
|
|
18
|
+
* with the entered key, and hands the packed credential to the standard auth
|
|
19
|
+
* control - the back-end supervisor plugin verifies the signature and mints a
|
|
20
|
+
* regular owlmeans token for the user.
|
|
21
|
+
*
|
|
22
|
+
* The plugin is self-contained: it renders its own minimal form and performs the
|
|
23
|
+
* token storage + redirect (mirroring the Google plugin), so a host app only has
|
|
24
|
+
* to register it (see web `appendSupervisorAuth`).
|
|
25
|
+
*/
|
|
26
|
+
export const supervisorClientPlugin: AuthenticationPlugin = {
|
|
27
|
+
type: AuthenticationType.Supervisor,
|
|
28
|
+
|
|
29
|
+
Implementation: () => ({ type, control }) => {
|
|
30
|
+
const context = useContext()
|
|
31
|
+
const [userId, setUserId] = useState('')
|
|
32
|
+
const [pk, setPk] = useState('')
|
|
33
|
+
const [error, setError] = useState<string | null>(null)
|
|
34
|
+
const [busy, setBusy] = useState(false)
|
|
35
|
+
|
|
36
|
+
const onSubmit = async (event: FormEvent) => {
|
|
37
|
+
event.preventDefault()
|
|
38
|
+
setError(null)
|
|
39
|
+
setBusy(true)
|
|
40
|
+
try {
|
|
41
|
+
// Fetch a fresh server challenge right before signing so the allowance is
|
|
42
|
+
// always ready (avoids a race when the form is submitted immediately).
|
|
43
|
+
await control.requestAllowence({ type })
|
|
44
|
+
|
|
45
|
+
const token = await control.authenticate({ userId, credential: pk })
|
|
46
|
+
|
|
47
|
+
if (token.token !== '') {
|
|
48
|
+
const authService = context.service<AuthService>(AUTH_SERVICE)
|
|
49
|
+
await authService.authenticate(token)
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const [homeUrl] = await context.module<Module<string>>(HOME).call({ full: true }) ?? []
|
|
53
|
+
window.location.href = homeUrl ?? window.location.origin
|
|
54
|
+
} catch (e) {
|
|
55
|
+
setError(e instanceof Error ? e.message : String(e))
|
|
56
|
+
setBusy(false)
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return (
|
|
61
|
+
<form onSubmit={onSubmit} data-testid="supervisor-auth-form"
|
|
62
|
+
style={{ display: 'flex', flexDirection: 'column', gap: 12, maxWidth: 420, margin: '0 auto' }}>
|
|
63
|
+
<h3>Supervisor sign-in (development)</h3>
|
|
64
|
+
<label style={{ display: 'flex', flexDirection: 'column', gap: 4 }}>
|
|
65
|
+
User id / email
|
|
66
|
+
<input name="userId" type="text" autoComplete="off" value={userId}
|
|
67
|
+
data-testid="supervisor-user-id"
|
|
68
|
+
onChange={e => setUserId(e.target.value)} required />
|
|
69
|
+
</label>
|
|
70
|
+
<label style={{ display: 'flex', flexDirection: 'column', gap: 4 }}>
|
|
71
|
+
Primary key
|
|
72
|
+
<input name="pk" type="password" autoComplete="off" value={pk}
|
|
73
|
+
data-testid="supervisor-pk"
|
|
74
|
+
onChange={e => setPk(e.target.value)} required />
|
|
75
|
+
</label>
|
|
76
|
+
<button type="submit" data-testid="supervisor-submit" disabled={busy || userId === '' || pk === ''}>
|
|
77
|
+
{busy ? 'Signing in…' : 'Sign in as supervisor'}
|
|
78
|
+
</button>
|
|
79
|
+
{error != null ? <p role="alert" data-testid="supervisor-error" style={{ color: 'crimson' }}>{error}</p> : null}
|
|
80
|
+
</form>
|
|
81
|
+
)
|
|
82
|
+
},
|
|
83
|
+
|
|
84
|
+
// Sign the supervisor payload with the entered private key and pack the salt +
|
|
85
|
+
// signature into `credential`. `credentials.challenge` here is the unwrapped,
|
|
86
|
+
// single-use server challenge (set by the auth control before this runs).
|
|
87
|
+
authenticate: async (credentials): Promise<AuthToken> => {
|
|
88
|
+
const key = makeKeyPairModel(credentials.credential)
|
|
89
|
+
const salt = createIdOfLength(16)
|
|
90
|
+
const signature = await key.sign(buildSupervisorPayload(credentials.challenge ?? '', credentials.userId, salt))
|
|
91
|
+
credentials.credential = JSON.stringify({ salt, signature })
|
|
92
|
+
|
|
93
|
+
// The real token is issued by the backend via the standard auth control flow.
|
|
94
|
+
return { token: '' }
|
|
95
|
+
}
|
|
96
|
+
}
|
package/src/consts.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AuthenticationType } from '@owlmeans/auth'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Front-end path that renders the supervisor login form. It reuses the standard
|
|
5
|
+
* typed authentication route (`/authentication/login/:type`, alias
|
|
6
|
+
* `CAUTHEN_AUTHEN_TYPED`) with the supervisor type, so no extra route
|
|
7
|
+
* registration is required - registering the client plugin is enough.
|
|
8
|
+
*/
|
|
9
|
+
export const SUPERVISOR_LOGIN_PATH = `/authentication/login/${AuthenticationType.Supervisor}`
|
package/src/index.ts
ADDED
package/tsconfig.json
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": [
|
|
3
|
+
"@owlmeans/dep-config/tsconfig.base.json",
|
|
4
|
+
"@owlmeans/dep-config/tsconfig.react.json"
|
|
5
|
+
],
|
|
6
|
+
"compilerOptions": {
|
|
7
|
+
"rootDir": "./src/",
|
|
8
|
+
"outDir": "./build/"
|
|
9
|
+
},
|
|
10
|
+
"exclude": ["./dist/**/*", "./build/**/*", "./tests/**/*", "./*.ts"]
|
|
11
|
+
}
|