@owlmeans/oidc 0.1.18-rc.52 → 0.1.18-rc.53
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
CHANGED
|
@@ -12,7 +12,7 @@ Shared OIDC protocol abstractions — guard/gate aliases, models, and immutable
|
|
|
12
12
|
## Installation
|
|
13
13
|
|
|
14
14
|
```bash
|
|
15
|
-
bun add @owlmeans/oidc@^0.1.18-rc.
|
|
15
|
+
bun add @owlmeans/oidc@^0.1.18-rc.53
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
## Usage
|
|
@@ -95,7 +95,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
|
|
|
95
95
|
your project's skill store (`.agents/skills/`):
|
|
96
96
|
|
|
97
97
|
```sh
|
|
98
|
-
npx @owlmeans/agent-skills@^0.1.18-rc.
|
|
98
|
+
npx @owlmeans/agent-skills@^0.1.18-rc.47
|
|
99
99
|
```
|
|
100
100
|
|
|
101
101
|
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": 2,
|
|
3
3
|
"package": "@owlmeans/oidc",
|
|
4
|
-
"version": "0.1.18-rc.
|
|
5
|
-
"generatedAt": "2026-10-
|
|
4
|
+
"version": "0.1.18-rc.53",
|
|
5
|
+
"generatedAt": "2026-10-03T20:05:07.594Z",
|
|
6
6
|
"canonicalRepo": "https://github.com/owlmeans/common",
|
|
7
7
|
"entries": [
|
|
8
8
|
{
|
|
@@ -8,7 +8,7 @@ user-invocable: false
|
|
|
8
8
|
# @owlmeans/oidc
|
|
9
9
|
|
|
10
10
|
**Layer:** Core
|
|
11
|
-
**Install:** `"@owlmeans/oidc": "^0.1.18-rc.
|
|
11
|
+
**Install:** `"@owlmeans/oidc": "^0.1.18-rc.53"` in `dependencies`
|
|
12
12
|
|
|
13
13
|
The shared half of the OIDC stack: no transport, no library. It owns the names, the shapes and the
|
|
14
14
|
guard that the server relying party (`@owlmeans/server-oidc-rp`), the browser relying party
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@owlmeans/oidc",
|
|
3
|
-
"version": "0.1.18-rc.
|
|
3
|
+
"version": "0.1.18-rc.53",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@owlmeans/auth": "^0.1.18-rc.38",
|
|
25
|
-
"@owlmeans/auth-common": "^0.1.18-rc.
|
|
26
|
-
"@owlmeans/basic-envelope": "^0.1.18-rc.
|
|
27
|
-
"@owlmeans/config": "^0.1.18-rc.
|
|
25
|
+
"@owlmeans/auth-common": "^0.1.18-rc.45",
|
|
26
|
+
"@owlmeans/basic-envelope": "^0.1.18-rc.44",
|
|
27
|
+
"@owlmeans/config": "^0.1.18-rc.42",
|
|
28
28
|
"@owlmeans/context": "^0.1.18-rc.32",
|
|
29
29
|
"@owlmeans/entrypoint": "^0.1.18-rc.39",
|
|
30
|
-
"@owlmeans/resource": "^0.1.18-rc.
|
|
30
|
+
"@owlmeans/resource": "^0.1.18-rc.38",
|
|
31
31
|
"@owlmeans/route": "^0.1.18-rc.33"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guard.spec.d.ts","sourceRoot":"","sources":["guard.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { describe, expect, mock, test } from 'bun:test';
|
|
2
|
+
/**
|
|
3
|
+
* A bearer that cannot be decoded is a credential the server does not accept — the guard answers
|
|
4
|
+
* "not authenticated" (the API layer's 401), exactly as for a signature that does not verify, and
|
|
5
|
+
* never throws the decoder's own error (which the API layer answers with 500).
|
|
6
|
+
*/
|
|
7
|
+
mock.module('@owlmeans/auth-common/utils', () => ({
|
|
8
|
+
trust: async () => ({ key: { verify: async () => false } }),
|
|
9
|
+
extractAuthToken: (req, type, strip = true) => {
|
|
10
|
+
const header = req.headers.authorization;
|
|
11
|
+
if (header == null || !header.toUpperCase().startsWith(type.toUpperCase()))
|
|
12
|
+
return null;
|
|
13
|
+
return strip ? header.split(' ')[1] : header;
|
|
14
|
+
},
|
|
15
|
+
}));
|
|
16
|
+
const { makeOidcGuard } = await import('../src/guard.js');
|
|
17
|
+
const call = async (authorization) => {
|
|
18
|
+
const guard = makeOidcGuard();
|
|
19
|
+
guard.assertCtx = () => ({ cfg: { alias: 'app' } });
|
|
20
|
+
const res = { responseProvider: { header: () => undefined } };
|
|
21
|
+
return await guard.handle({ headers: { authorization } }, res);
|
|
22
|
+
};
|
|
23
|
+
describe('oidc guard', () => {
|
|
24
|
+
test('an undecodable wrapped token is unauthenticated, not a server error', async () => {
|
|
25
|
+
expect(await call('OIDC-WRAPPED-TOKEN bogus.token')).toBe(false);
|
|
26
|
+
});
|
|
27
|
+
test('garbage of every shape stays unauthenticated', async () => {
|
|
28
|
+
expect(await call('OIDC-WRAPPED-TOKEN %%%')).toBe(false);
|
|
29
|
+
expect(await call('OIDC-WRAPPED-TOKEN ')).toBe(false);
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
//# sourceMappingURL=guard.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guard.spec.js","sourceRoot":"","sources":["guard.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAEvD;;;;GAIG;AACH,IAAI,CAAC,MAAM,CAAC,6BAA6B,EAAE,GAAG,EAAE,CAAC,CAAC;IAChD,KAAK,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,MAAM,EAAE,KAAK,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