@owlmeans/auth 0.1.20-rc.1 → 0.2.0-alpha.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 +4 -5
- package/agent-meta/manifest.json +2 -2
- package/agent-meta/skills/auth/SKILL.md +8 -7
- package/build/consts.d.ts +4 -6
- package/build/consts.d.ts.map +1 -1
- package/build/consts.js +6 -6
- package/build/consts.js.map +1 -1
- package/package.json +3 -3
- package/src/consts.ts +6 -7
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ shared auth protocols and organization-entity resolution (`makeEntityScope(req)`
|
|
|
14
14
|
## Installation
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
|
-
bun add @owlmeans/auth@^0.
|
|
17
|
+
bun add @owlmeans/auth@^0.2.0-alpha.0
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
`ajv` is a **peer** dependency — install it alongside, or `authHelper.verifyAuth` /
|
|
@@ -226,7 +226,7 @@ All symbols are exported from the package root (`@owlmeans/auth`); there are no
|
|
|
226
226
|
| Symbol | Kind | Purpose |
|
|
227
227
|
|--------|------|---------|
|
|
228
228
|
| `AuthRole` | string enum | `User`, `Guest`, `Service`, `System`, `Admin`, `Superuser`, `Blocked` |
|
|
229
|
-
| `AuthenticationType` | string enum | How identity is proven: `BasicEd25519`, `OneTimeToken`, `
|
|
229
|
+
| `AuthenticationType` | string enum | How identity is proven: `BasicEd25519`, `OneTimeToken`, `Captcha` (`'captcha'`), `WalletDid`, `RelyHandshake`, `WalletConsumer`, `WalletProvider`, `Google` (`'google-oauth'`), `Supervisor` (`'pk-supervisor'`) |
|
|
230
230
|
| `AuthroizationType` (sic) | string enum | How a request carries authorization: `AuthToken`, `Ed25519BasicToken`, `Ed25519BasicSignature` |
|
|
231
231
|
| `AuthenticationStage` | string enum | Flow stage: `Error`, `Init`, `Allowence`, `Authenticate`, `Authentication`, `Authenticated` |
|
|
232
232
|
|
|
@@ -242,8 +242,7 @@ All symbols are exported from the package root (`@owlmeans/auth`); there are no
|
|
|
242
242
|
| `AUTHEN`, `AUTHEN_INIT`, `AUTHEN_AUTHEN`, `AUTHEN_RELY` | const | Backend authentication entrypoint aliases |
|
|
243
243
|
| `CAUTHEN`, `CAUTHEN_AUTHEN`, `CAUTHEN_AUTHEN_DEFAULT`, `CAUTHEN_AUTHEN_TYPED`, `CAUTHEN_FLOW_ENTER` | const | Front-end authentication entrypoint aliases |
|
|
244
244
|
| `DISPATCHER`, `DISPATCHER_AUTHEN`, `DISPATCHER_SURROGATE` | const | Dispatcher and surrogate login-window entrypoint aliases |
|
|
245
|
-
| `
|
|
246
|
-
| `RECAPTCHA_GUARD` | const | `'guard:re-captcha'` — the guard alias of a route a reCAPTCHA-proven guest calls once |
|
|
245
|
+
| `CAPTCHA_GUARD` | const | `'guard:captcha'` — the guard alias of a route a captcha-proven guest calls once |
|
|
247
246
|
|
|
248
247
|
### Errors
|
|
249
248
|
|
|
@@ -332,7 +331,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
|
|
|
332
331
|
your project's skill store (`.agents/skills/`):
|
|
333
332
|
|
|
334
333
|
```sh
|
|
335
|
-
npx @owlmeans/agent-skills@^0.
|
|
334
|
+
npx @owlmeans/agent-skills@^0.2.0-alpha.0
|
|
336
335
|
```
|
|
337
336
|
|
|
338
337
|
The embedded files are version-matched to this package release. Do not edit them
|
package/agent-meta/manifest.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 3,
|
|
3
3
|
"package": "@owlmeans/auth",
|
|
4
|
-
"version": "0.
|
|
5
|
-
"generatedAt": "2026-11-
|
|
4
|
+
"version": "0.2.0-alpha.0",
|
|
5
|
+
"generatedAt": "2026-11-09T19:44:59.483Z",
|
|
6
6
|
"canonicalRepo": "https://github.com/owlmeans/common",
|
|
7
7
|
"entries": [
|
|
8
8
|
{
|
|
@@ -8,7 +8,7 @@ user-invocable: false
|
|
|
8
8
|
# @owlmeans/auth
|
|
9
9
|
|
|
10
10
|
**Layer:** Core
|
|
11
|
-
**Install:** `"@owlmeans/auth": "^0.
|
|
11
|
+
**Install:** `"@owlmeans/auth": "^0.2.0-alpha.0"` in `dependencies`
|
|
12
12
|
|
|
13
13
|
Types, enums, errors and schemas only — no services, no wiring. Every other auth package builds on
|
|
14
14
|
this vocabulary, so a symbol belongs here exactly when both a server and a browser need to agree on
|
|
@@ -38,7 +38,7 @@ it.
|
|
|
38
38
|
| Export | Description |
|
|
39
39
|
|--------|-------------|
|
|
40
40
|
| `AuthRole` | **String** enum: `User`, `Guest`, `Service`, `System`, `Admin`, `Superuser`, `Blocked` |
|
|
41
|
-
| `AuthenticationType` | How identity is proven: `BasicEd25519`, `OneTimeToken`, `
|
|
41
|
+
| `AuthenticationType` | How identity is proven: `BasicEd25519`, `OneTimeToken`, `Captcha` (`'captcha'`), `WalletDid`, `RelyHandshake`, `WalletConsumer`, `WalletProvider`, `Google` (`'google-oauth'`), `Supervisor` (`'pk-supervisor'`) |
|
|
42
42
|
| `AuthroizationType` (sic) | How a request carries authorization: `AuthToken`, `Ed25519BasicToken`, `Ed25519BasicSignature` |
|
|
43
43
|
| `AuthenticationStage` | Client-side flow stage: `Error`, `Init`, `Allowence`, `Authenticate`, `Authentication`, `Authenticated` |
|
|
44
44
|
| `AUTH_HEADER` / `AUTH_QUERY` | `'authorization'` / `'token'` |
|
|
@@ -49,8 +49,7 @@ it.
|
|
|
49
49
|
| `AUTHEN`, `AUTHEN_INIT`, `AUTHEN_AUTHEN`, `AUTHEN_RELY` | Backend entrypoint aliases |
|
|
50
50
|
| `CAUTHEN`, `CAUTHEN_AUTHEN`, `CAUTHEN_AUTHEN_DEFAULT`, `CAUTHEN_AUTHEN_TYPED`, `CAUTHEN_FLOW_ENTER` | Front-end entrypoint aliases |
|
|
51
51
|
| `DISPATCHER`, `DISPATCHER_AUTHEN`, `DISPATCHER_SURROGATE` | Dispatcher and surrogate-window entrypoint aliases |
|
|
52
|
-
| `
|
|
53
|
-
| `RECAPTCHA_GUARD` | `'guard:re-captcha'` — the guard alias of a route a reCAPTCHA-proven guest may call once (`makeReCaptchaGuard` in `@owlmeans/server-auth`) |
|
|
52
|
+
| `CAPTCHA_GUARD` | `'guard:captcha'` — the guard alias of a route a captcha-proven guest may call once (`makeCaptchaGuard` in `@owlmeans/server-auth`) |
|
|
54
53
|
|
|
55
54
|
### Errors
|
|
56
55
|
|
|
@@ -154,9 +153,11 @@ Rules of thumb:
|
|
|
154
153
|
handler-level checks around these types.
|
|
155
154
|
- WebSocket wiring uses `Auth`, `AuthToken` and `AuthenticationStage` to move a token-bearing
|
|
156
155
|
connection into an authenticated state.
|
|
157
|
-
- `AuthenticationType.
|
|
158
|
-
(`GUEST_ID`, `AuthRole.Guest`, `[AUTH_SCOPE]`), travels as `Authorization:
|
|
159
|
-
|
|
156
|
+
- `AuthenticationType.Captcha` proves a solved challenge, never a person: its token is a guest
|
|
157
|
+
(`GUEST_ID`, `AuthRole.Guest`, `[AUTH_SCOPE]`), travels as `Authorization: CAPTCHA <token>`, is
|
|
158
|
+
accepted only by a route guarded with `CAPTCHA_GUARD`, and never becomes a session. Which captcha
|
|
159
|
+
provider judged it is the server's business (`@owlmeans/captcha`); the provider's config records
|
|
160
|
+
live in its own package, never here.
|
|
160
161
|
- A provider login (Google/OIDC, OTP, supervisor) ultimately produces an ordinary `AuthPayload` with
|
|
161
162
|
`userId`, `profileId`, `entitySlug` and `scopes`; `@owlmeans/server-auth-identity` stores the local
|
|
162
163
|
identity behind it and returns that payload.
|
package/build/consts.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export declare enum AuthRole {
|
|
|
17
17
|
export declare enum AuthenticationType {
|
|
18
18
|
BasicEd25519 = "basic-ed25519",
|
|
19
19
|
OneTimeToken = "one-time-token",
|
|
20
|
-
|
|
20
|
+
Captcha = "captcha",
|
|
21
21
|
WalletDid = "wallet-did",
|
|
22
22
|
RelyHandshake = "rely-handshake",
|
|
23
23
|
WalletConsumer = "wallet-consumer",
|
|
@@ -74,13 +74,11 @@ export declare const AUTH_HEADER = "authorization";
|
|
|
74
74
|
export declare const AUTH_QUERY = "token";
|
|
75
75
|
export declare const ENTITY_QUERY = "entitySlug";
|
|
76
76
|
export declare const PROFILE_QUERY = "profile";
|
|
77
|
-
export declare const MOD_RECAPTCHA = "_external:re-captcha";
|
|
78
|
-
export declare const CMOD_RECAPTCHA: string;
|
|
79
77
|
/**
|
|
80
|
-
* The guard of a route a
|
|
81
|
-
*
|
|
78
|
+
* The guard of a route a captcha-proven guest may call once: `Authorization: CAPTCHA <token>`, the
|
|
79
|
+
* token the auth manager's captcha plugin issued (`makeCaptchaGuard` in server-auth).
|
|
82
80
|
*/
|
|
83
|
-
export declare const
|
|
81
|
+
export declare const CAPTCHA_GUARD = "guard:captcha";
|
|
84
82
|
export declare const GUEST_ID = "__guest";
|
|
85
83
|
export declare const RELY_3RD = "rely";
|
|
86
84
|
//# sourceMappingURL=consts.d.ts.map
|
package/build/consts.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAA;AAEzC,eAAO,MAAM,OAAO,MAAM,CAAA;AAC1B,eAAO,MAAM,OAAO,MAAM,CAAA;AAC1B,eAAO,MAAM,QAAQ,MAAM,CAAA;AAC3B,eAAO,MAAM,SAAS,MAAM,CAAA;AAE5B,eAAO,MAAM,UAAU,MAAM,CAAA;AAC7B,eAAO,MAAM,UAAU,WAAW,CAAA;AAElC,oBAAY,QAAQ;IAClB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,SAAS,cAAc;IACvB,OAAO,YAAY;CACpB;AAED,oBAAY,kBAAkB;IAC5B,YAAY,kBAAkB;IAC9B,YAAY,mBAAmB;
|
|
1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AACjC,eAAO,MAAM,QAAQ,SAAS,CAAA"}
|
package/build/consts.js
CHANGED
|
@@ -18,7 +18,9 @@ export var AuthenticationType;
|
|
|
18
18
|
(function (AuthenticationType) {
|
|
19
19
|
AuthenticationType["BasicEd25519"] = "basic-ed25519";
|
|
20
20
|
AuthenticationType["OneTimeToken"] = "one-time-token";
|
|
21
|
-
|
|
21
|
+
// A solved captcha challenge — proves a person, never an identity. Which captcha provider judged
|
|
22
|
+
// it is a server matter (`@owlmeans/captcha`); the token is a single-use guest credential.
|
|
23
|
+
AuthenticationType["Captcha"] = "captcha";
|
|
22
24
|
// @TODO think if it should be moved from here
|
|
23
25
|
// - it's too implementation specific
|
|
24
26
|
// OwlMeans specific WalletProvider authentication type.
|
|
@@ -111,13 +113,11 @@ export const AUTH_HEADER = 'authorization';
|
|
|
111
113
|
export const AUTH_QUERY = 'token';
|
|
112
114
|
export const ENTITY_QUERY = 'entitySlug';
|
|
113
115
|
export const PROFILE_QUERY = 'profile';
|
|
114
|
-
export const MOD_RECAPTCHA = '_external:re-captcha';
|
|
115
|
-
export const CMOD_RECAPTCHA = `_client-${MOD_RECAPTCHA.slice(1)}`;
|
|
116
116
|
/**
|
|
117
|
-
* The guard of a route a
|
|
118
|
-
*
|
|
117
|
+
* The guard of a route a captcha-proven guest may call once: `Authorization: CAPTCHA <token>`, the
|
|
118
|
+
* token the auth manager's captcha plugin issued (`makeCaptchaGuard` in server-auth).
|
|
119
119
|
*/
|
|
120
|
-
export const
|
|
120
|
+
export const CAPTCHA_GUARD = 'guard:captcha';
|
|
121
121
|
export const GUEST_ID = '__guest';
|
|
122
122
|
export const RELY_3RD = 'rely';
|
|
123
123
|
//# sourceMappingURL=consts.js.map
|
package/build/consts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consts.js","sourceRoot":"","sources":["../src/consts.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,OAAO,GAAG,GAAG,CAAA;AAC1B,MAAM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0.
|
|
3
|
+
"version": "0.2.0-alpha.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"homepage": "https://owlmeans.com/docs/",
|
|
6
6
|
"repository": {
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@owlmeans/error": "^0.
|
|
35
|
+
"@owlmeans/error": "^0.2.0-alpha.0",
|
|
36
36
|
"ajv-formats": "^3.0.1"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"ajv": "*"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@owlmeans/dep-config": "^0.
|
|
42
|
+
"@owlmeans/dep-config": "^0.2.0-alpha.0",
|
|
43
43
|
"@types/bun": "^1.4.4",
|
|
44
44
|
"nodemon": "^3.1.14",
|
|
45
45
|
"typescript": "^7.0.2"
|
package/src/consts.ts
CHANGED
|
@@ -21,7 +21,9 @@ export enum AuthRole {
|
|
|
21
21
|
export enum AuthenticationType {
|
|
22
22
|
BasicEd25519 = 'basic-ed25519',
|
|
23
23
|
OneTimeToken = 'one-time-token',
|
|
24
|
-
|
|
24
|
+
// A solved captcha challenge — proves a person, never an identity. Which captcha provider judged
|
|
25
|
+
// it is a server matter (`@owlmeans/captcha`); the token is a single-use guest credential.
|
|
26
|
+
Captcha = 'captcha',
|
|
25
27
|
// @TODO think if it should be moved from here
|
|
26
28
|
// - it's too implementation specific
|
|
27
29
|
// OwlMeans specific WalletProvider authentication type.
|
|
@@ -134,14 +136,11 @@ export const AUTH_QUERY = 'token'
|
|
|
134
136
|
export const ENTITY_QUERY = 'entitySlug'
|
|
135
137
|
export const PROFILE_QUERY = 'profile'
|
|
136
138
|
|
|
137
|
-
export const MOD_RECAPTCHA = '_external:re-captcha'
|
|
138
|
-
export const CMOD_RECAPTCHA = `_client-${MOD_RECAPTCHA.slice(1)}`
|
|
139
|
-
|
|
140
139
|
/**
|
|
141
|
-
* The guard of a route a
|
|
142
|
-
*
|
|
140
|
+
* The guard of a route a captcha-proven guest may call once: `Authorization: CAPTCHA <token>`, the
|
|
141
|
+
* token the auth manager's captcha plugin issued (`makeCaptchaGuard` in server-auth).
|
|
143
142
|
*/
|
|
144
|
-
export const
|
|
143
|
+
export const CAPTCHA_GUARD = 'guard:captcha'
|
|
145
144
|
|
|
146
145
|
export const GUEST_ID = '__guest'
|
|
147
146
|
export const RELY_3RD = 'rely'
|