@owlmeans/server-oidc-provider 0.1.18-rc.52 → 0.1.18-rc.54

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
@@ -14,7 +14,7 @@ Embedded OIDC identity provider — wraps the `oidc-provider` library as an OwlM
14
14
  ## Installation
15
15
 
16
16
  ```bash
17
- bun add @owlmeans/server-oidc-provider@^0.1.18-rc.52
17
+ bun add @owlmeans/server-oidc-provider@^0.1.18-rc.54
18
18
  ```
19
19
 
20
20
  ## Usage
@@ -72,7 +72,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
72
72
  your project's skill store (`.agents/skills/`):
73
73
 
74
74
  ```sh
75
- npx @owlmeans/agent-skills@^0.1.18-rc.52
75
+ npx @owlmeans/agent-skills@^0.1.18-rc.56
76
76
  ```
77
77
 
78
78
  The embedded files are version-matched to this package release. Do not edit them
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
3
  "package": "@owlmeans/server-oidc-provider",
4
- "version": "0.1.18-rc.52",
5
- "generatedAt": "2026-10-08T21:27:54.314Z",
4
+ "version": "0.1.18-rc.54",
5
+ "generatedAt": "2026-10-17T00:00:32.719Z",
6
6
  "canonicalRepo": "https://github.com/owlmeans/common",
7
7
  "entries": [
8
8
  {
@@ -8,7 +8,7 @@ user-invocable: false
8
8
  # @owlmeans/server-oidc-provider
9
9
 
10
10
  **Layer:** Server
11
- **Install:** `"@owlmeans/server-oidc-provider": "^0.1.18-rc.52"` in `dependencies`
11
+ **Install:** `"@owlmeans/server-oidc-provider": "^0.1.18-rc.54"` in `dependencies`
12
12
  **Runtime deps:** `oidc-provider@9.11.1` (exact), `jose@6.2.5` (exact), `@types/oidc-provider@9.5.0`
13
13
 
14
14
  Use this only when your service **is** the identity provider. For consuming someone else's issuer,
@@ -0,0 +1,7 @@
1
+ import type { ClientMetadata } from 'oidc-provider';
2
+ import type { Context } from '../types.js';
3
+ import type { SecurityHelper } from '@owlmeans/config';
4
+ export declare const updateClient: (context: Context, client: ClientMetadata) => ClientMetadata;
5
+ /** Expands a `{{service-alias}}/path` URI against that registered service; any other URI is kept. */
6
+ export declare const makeUriUpdater: (context: Context, helper: SecurityHelper) => (uri: string) => string;
7
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/utils/client.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,KAAK,EAAU,OAAO,EAAE,MAAM,aAAa,CAAA;AAElD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAMtD,eAAO,MAAM,YAAY,YAAa,OAAO,UAAU,cAAc,KAAG,cAkBvE,CAAA;AAED,qGAAqG;AACrG,eAAO,MAAM,cAAc,YAAa,OAAO,UAAU,cAAc,WAAW,MAAM,KAAG,MAS1F,CAAA"}
@@ -0,0 +1,33 @@
1
+ import { randomBytes } from '@noble/hashes/utils';
2
+ import { hex } from '@scure/base';
3
+ import { makeSecurityHelper } from '@owlmeans/config';
4
+ import { SEP } from '@owlmeans/route';
5
+ import { logger } from '@owlmeans/log';
6
+ const log = logger('server-oidc-provider');
7
+ export const updateClient = (context, client) => {
8
+ if (client.client_secret == null) {
9
+ if (!context.cfg.debug.all && !context.cfg.debug.oidc) {
10
+ throw new SyntaxError('Client secret is required');
11
+ }
12
+ client.client_secret = hex.encode(randomBytes(32));
13
+ // The secret itself is never written to a log.
14
+ log.warn('Exceptionally insecure: a client secret was generated for an OIDC client (debug only)', {
15
+ clientId: client.client_id,
16
+ });
17
+ }
18
+ const helper = makeSecurityHelper(context);
19
+ const updateUri = makeUriUpdater(context, helper);
20
+ client.redirect_uris = client.redirect_uris?.map(updateUri) ?? [];
21
+ client.post_logout_redirect_uris = client.post_logout_redirect_uris?.map(updateUri) ?? [];
22
+ return client;
23
+ };
24
+ /** Expands a `{{service-alias}}/path` URI against that registered service; any other URI is kept. */
25
+ export const makeUriUpdater = (context, helper) => (uri) => {
26
+ if (uri.startsWith('{{')) {
27
+ const [host, ...parts] = uri.split(SEP);
28
+ const service = context.cfg.services[host.slice(2, -2)];
29
+ return helper.makeUrl(service, parts.join(SEP));
30
+ }
31
+ return uri;
32
+ };
33
+ //# sourceMappingURL=client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/utils/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACjD,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA;AAGjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAErD,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAA;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAEtC,MAAM,GAAG,GAAG,MAAM,CAAC,sBAAsB,CAAC,CAAA;AAE1C,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,OAAgB,EAAE,MAAsB,EAAkB,EAAE;IACvF,IAAI,MAAM,CAAC,aAAa,IAAI,IAAI,EAAE,CAAC;QACjC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;YACtD,MAAM,IAAI,WAAW,CAAC,2BAA2B,CAAC,CAAA;QACpD,CAAC;QACD,MAAM,CAAC,aAAa,GAAG,GAAG,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,CAAA;QAClD,+CAA+C;QAC/C,GAAG,CAAC,IAAI,CAAC,uFAAuF,EAAE;YAChG,QAAQ,EAAE,MAAM,CAAC,SAAS;SAC3B,CAAC,CAAA;IACJ,CAAC;IAED,MAAM,MAAM,GAAG,kBAAkB,CAAkB,OAAO,CAAC,CAAA;IAC3D,MAAM,SAAS,GAAG,cAAc,CAAC,OAAO,EAAE,MAAM,CAAC,CAAA;IACjD,MAAM,CAAC,aAAa,GAAG,MAAM,CAAC,aAAa,EAAE,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE,CAAA;IACjE,MAAM,CAAC,yBAAyB,GAAG,MAAM,CAAC,yBAAyB,EAAE,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE,CAAA;IAEzF,OAAO,MAAM,CAAA;AACf,CAAC,CAAA;AAED,qGAAqG;AACrG,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,OAAgB,EAAE,MAAsB,EAAE,EAAE,CAAC,CAAC,GAAW,EAAU,EAAE;IAClG,IAAI,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QACzB,MAAM,CAAC,IAAI,EAAE,GAAG,KAAK,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;QAEvC,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;QACvD,OAAO,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAA;IACjD,CAAC;IAED,OAAO,GAAG,CAAA;AACZ,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@owlmeans/server-oidc-provider",
3
- "version": "0.1.18-rc.52",
3
+ "version": "0.1.18-rc.54",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -39,9 +39,9 @@
39
39
  "@owlmeans/context": "^0.1.18-rc.34",
40
40
  "@owlmeans/entrypoint": "^0.1.18-rc.41",
41
41
  "@owlmeans/log": "^0.1.18-rc.3",
42
- "@owlmeans/oidc": "^0.1.18-rc.57",
42
+ "@owlmeans/oidc": "^0.1.18-rc.59",
43
43
  "@owlmeans/route": "^0.1.18-rc.35",
44
- "@owlmeans/server-api": "^0.1.18-rc.53",
44
+ "@owlmeans/server-api": "^0.1.18-rc.55",
45
45
  "@owlmeans/server-context": "^0.1.18-rc.44",
46
46
  "@scure/base": "^2.4.0",
47
47
  "jose": "6.2.12",