@webpieces/http-server 0.4.880 → 0.4.881
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webpieces/http-server",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.881",
|
|
4
4
|
"description": "WebPieces server with filter chain and dependency injection",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
"access": "public"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@webpieces/core-context": "0.4.
|
|
26
|
-
"@webpieces/core-util": "0.4.
|
|
27
|
-
"@webpieces/gcp-identity": "0.4.
|
|
28
|
-
"@webpieces/http-routing": "0.4.
|
|
25
|
+
"@webpieces/core-context": "0.4.881",
|
|
26
|
+
"@webpieces/core-util": "0.4.881",
|
|
27
|
+
"@webpieces/gcp-identity": "0.4.881",
|
|
28
|
+
"@webpieces/http-routing": "0.4.881",
|
|
29
29
|
"cors": "2.8.5",
|
|
30
30
|
"express": "5.1.0",
|
|
31
31
|
"inversify": "7.10.4"
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { NextFunction, Request, Response } from 'express';
|
|
2
|
+
import { OAuthProtocolError } from '@webpieces/core-util';
|
|
3
|
+
/**
|
|
4
|
+
* The express boundary for an app's OWN OAuth routes — `/oauth/token`, `/oauth/register`,
|
|
5
|
+
* `/oauth/authorize` — which an app mounts directly on express beside `WpMcpServer.bind(...)`
|
|
6
|
+
* (webpieces leaves token issuance pluggable). It answers an {@link OAuthProtocolError} in the RFC
|
|
7
|
+
* 6749/6750 shape and logs it at INFO as an EXPECTED refusal (#1176); anything else is passed to
|
|
8
|
+
* the next express error handler untouched, so a real bug is still a fault.
|
|
9
|
+
*
|
|
10
|
+
* Two ways to use it, for the two shapes a raw route boundary takes:
|
|
11
|
+
*
|
|
12
|
+
* ```ts
|
|
13
|
+
* const oauthErrors = new OAuthExpressErrorHandler();
|
|
14
|
+
* // 1. as express error middleware (express 5 forwards an async handler's rejection to it)
|
|
15
|
+
* app.post('/oauth/token', urlencoded({ extended: false }), tokenHandler, oauthErrors.middleware);
|
|
16
|
+
* // 2. from a route's own try/catch
|
|
17
|
+
* if (err instanceof OAuthProtocolError) oauthErrors.write(res, err);
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* A webpieces `@Endpoint` that throws an `OAuthProtocolError` needs neither: the default
|
|
21
|
+
* `ErrorTranslator` renders it with the same `OAuthErrorResponse`.
|
|
22
|
+
*/
|
|
23
|
+
export declare class OAuthExpressErrorHandler {
|
|
24
|
+
private readonly responseWriter;
|
|
25
|
+
/**
|
|
26
|
+
* Express error middleware (four parameters, which is how express recognises one). An arrow
|
|
27
|
+
* property so it can be handed to `app.use(...)` without losing `this`.
|
|
28
|
+
*/
|
|
29
|
+
readonly middleware: (failure: unknown, _req: Request, res: Response, next: NextFunction) => void;
|
|
30
|
+
/** Write `error` in the RFC shape, with its status and headers, and log it at INFO. */
|
|
31
|
+
write(res: Response, error: OAuthProtocolError): void;
|
|
32
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OAuthExpressErrorHandler = void 0;
|
|
4
|
+
const core_util_1 = require("@webpieces/core-util");
|
|
5
|
+
const ExpressResponseWriter_1 = require("./ExpressResponseWriter");
|
|
6
|
+
const log = core_util_1.LogManager.getLogger('OAuthExpressErrorHandler');
|
|
7
|
+
/**
|
|
8
|
+
* The express boundary for an app's OWN OAuth routes — `/oauth/token`, `/oauth/register`,
|
|
9
|
+
* `/oauth/authorize` — which an app mounts directly on express beside `WpMcpServer.bind(...)`
|
|
10
|
+
* (webpieces leaves token issuance pluggable). It answers an {@link OAuthProtocolError} in the RFC
|
|
11
|
+
* 6749/6750 shape and logs it at INFO as an EXPECTED refusal (#1176); anything else is passed to
|
|
12
|
+
* the next express error handler untouched, so a real bug is still a fault.
|
|
13
|
+
*
|
|
14
|
+
* Two ways to use it, for the two shapes a raw route boundary takes:
|
|
15
|
+
*
|
|
16
|
+
* ```ts
|
|
17
|
+
* const oauthErrors = new OAuthExpressErrorHandler();
|
|
18
|
+
* // 1. as express error middleware (express 5 forwards an async handler's rejection to it)
|
|
19
|
+
* app.post('/oauth/token', urlencoded({ extended: false }), tokenHandler, oauthErrors.middleware);
|
|
20
|
+
* // 2. from a route's own try/catch
|
|
21
|
+
* if (err instanceof OAuthProtocolError) oauthErrors.write(res, err);
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* A webpieces `@Endpoint` that throws an `OAuthProtocolError` needs neither: the default
|
|
25
|
+
* `ErrorTranslator` renders it with the same `OAuthErrorResponse`.
|
|
26
|
+
*/
|
|
27
|
+
class OAuthExpressErrorHandler {
|
|
28
|
+
responseWriter = new ExpressResponseWriter_1.ExpressResponseWriter();
|
|
29
|
+
/**
|
|
30
|
+
* Express error middleware (four parameters, which is how express recognises one). An arrow
|
|
31
|
+
* property so it can be handed to `app.use(...)` without losing `this`.
|
|
32
|
+
*/
|
|
33
|
+
// webpieces-disable no-any-unknown -- express hands an error handler whatever was thrown
|
|
34
|
+
middleware = (failure, _req, res, next) => {
|
|
35
|
+
if (!(failure instanceof core_util_1.OAuthProtocolError)) {
|
|
36
|
+
next(failure);
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
this.write(res, failure);
|
|
40
|
+
};
|
|
41
|
+
/** Write `error` in the RFC shape, with its status and headers, and log it at INFO. */
|
|
42
|
+
write(res, error) {
|
|
43
|
+
const level = error.isCallerError() ? 'refused' : 'unavailable';
|
|
44
|
+
log.info(`OAuth request ${level}: status=${error.status} error=${error.error} message=${error.message}`);
|
|
45
|
+
if (res.headersSent) {
|
|
46
|
+
res.end();
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
this.responseWriter.write(res, core_util_1.OAuthErrorResponse.toResponse(error, undefined));
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
exports.OAuthExpressErrorHandler = OAuthExpressErrorHandler;
|
|
53
|
+
//# sourceMappingURL=OAuthExpressErrorHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OAuthExpressErrorHandler.js","sourceRoot":"","sources":["../../../../../packages/http/http-server/src/OAuthExpressErrorHandler.ts"],"names":[],"mappings":";;;AACA,oDAA0F;AAC1F,mEAAgE;AAEhE,MAAM,GAAG,GAAG,sBAAU,CAAC,SAAS,CAAC,0BAA0B,CAAC,CAAC;AAE7D;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAa,wBAAwB;IAChB,cAAc,GAAG,IAAI,6CAAqB,EAAE,CAAC;IAE9D;;;OAGG;IACH,yFAAyF;IAChF,UAAU,GAAG,CAClB,OAAgB,EAChB,IAAa,EACb,GAAa,EACb,IAAkB,EACd,EAAE;QACN,IAAI,CAAC,CAAC,OAAO,YAAY,8BAAkB,CAAC,EAAE,CAAC;YAC3C,IAAI,CAAC,OAAO,CAAC,CAAC;YACd,OAAO;QACX,CAAC;QACD,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IAC7B,CAAC,CAAC;IAEF,uFAAuF;IACvF,KAAK,CAAC,GAAa,EAAE,KAAyB;QAC1C,MAAM,KAAK,GAAG,KAAK,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC;QAChE,GAAG,CAAC,IAAI,CACJ,iBAAiB,KAAK,YAAY,KAAK,CAAC,MAAM,UAAU,KAAK,CAAC,KAAK,YAAY,KAAK,CAAC,OAAO,EAAE,CACjG,CAAC;QACF,IAAI,GAAG,CAAC,WAAW,EAAE,CAAC;YAClB,GAAG,CAAC,GAAG,EAAE,CAAC;YACV,OAAO;QACX,CAAC;QACD,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,EAAE,8BAAkB,CAAC,UAAU,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC;IACpF,CAAC;CACJ;AAjCD,4DAiCC","sourcesContent":["import { NextFunction, Request, Response } from 'express';\nimport { LogManager, OAuthErrorResponse, OAuthProtocolError } from '@webpieces/core-util';\nimport { ExpressResponseWriter } from './ExpressResponseWriter';\n\nconst log = LogManager.getLogger('OAuthExpressErrorHandler');\n\n/**\n * The express boundary for an app's OWN OAuth routes — `/oauth/token`, `/oauth/register`,\n * `/oauth/authorize` — which an app mounts directly on express beside `WpMcpServer.bind(...)`\n * (webpieces leaves token issuance pluggable). It answers an {@link OAuthProtocolError} in the RFC\n * 6749/6750 shape and logs it at INFO as an EXPECTED refusal (#1176); anything else is passed to\n * the next express error handler untouched, so a real bug is still a fault.\n *\n * Two ways to use it, for the two shapes a raw route boundary takes:\n *\n * ```ts\n * const oauthErrors = new OAuthExpressErrorHandler();\n * // 1. as express error middleware (express 5 forwards an async handler's rejection to it)\n * app.post('/oauth/token', urlencoded({ extended: false }), tokenHandler, oauthErrors.middleware);\n * // 2. from a route's own try/catch\n * if (err instanceof OAuthProtocolError) oauthErrors.write(res, err);\n * ```\n *\n * A webpieces `@Endpoint` that throws an `OAuthProtocolError` needs neither: the default\n * `ErrorTranslator` renders it with the same `OAuthErrorResponse`.\n */\nexport class OAuthExpressErrorHandler {\n private readonly responseWriter = new ExpressResponseWriter();\n\n /**\n * Express error middleware (four parameters, which is how express recognises one). An arrow\n * property so it can be handed to `app.use(...)` without losing `this`.\n */\n // webpieces-disable no-any-unknown -- express hands an error handler whatever was thrown\n readonly middleware = (\n failure: unknown,\n _req: Request,\n res: Response,\n next: NextFunction,\n ): void => {\n if (!(failure instanceof OAuthProtocolError)) {\n next(failure);\n return;\n }\n this.write(res, failure);\n };\n\n /** Write `error` in the RFC shape, with its status and headers, and log it at INFO. */\n write(res: Response, error: OAuthProtocolError): void {\n const level = error.isCallerError() ? 'refused' : 'unavailable';\n log.info(\n `OAuth request ${level}: status=${error.status} error=${error.error} message=${error.message}`,\n );\n if (res.headersSent) {\n res.end();\n return;\n }\n this.responseWriter.write(res, OAuthErrorResponse.toResponse(error, undefined));\n }\n}\n"]}
|
package/src/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export { StreamBodyReader } from './body/StreamBodyReader';
|
|
|
5
5
|
export { PreConsumedBodyReader } from './body/PreConsumedBodyReader';
|
|
6
6
|
export { RecordingFilter } from './filters/RecordingFilter';
|
|
7
7
|
export { ExpressResponseWriter } from './ExpressResponseWriter';
|
|
8
|
+
export { OAuthExpressErrorHandler } from './OAuthExpressErrorHandler';
|
|
8
9
|
export { TestCaseRecorderImpl } from './recorder/TestCaseRecorderImpl';
|
|
9
10
|
export { SpecGenerator } from './recorder/SpecGenerator';
|
|
10
11
|
export { recordable } from './recorder/recordable';
|
package/src/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SharedSecrets = exports.AuthenticatedCaller = exports.AuthConfig = exports.HttpRequest = exports.ApiClient = exports.FilterDefinition = exports.FilterMatcher = exports.MethodMeta = exports.RouteHandler = exports.HeaderRegistry = exports.WebpiecesCoreHeaders = exports.recordable = exports.SpecGenerator = exports.TestCaseRecorderImpl = exports.ExpressResponseWriter = exports.RecordingFilter = exports.PreConsumedBodyReader = exports.StreamBodyReader = exports.WebpiecesMiddleware = exports.WebpiecesExpressRouter = void 0;
|
|
3
|
+
exports.SharedSecrets = exports.AuthenticatedCaller = exports.AuthConfig = exports.HttpRequest = exports.ApiClient = exports.FilterDefinition = exports.FilterMatcher = exports.MethodMeta = exports.RouteHandler = exports.HeaderRegistry = exports.WebpiecesCoreHeaders = exports.recordable = exports.SpecGenerator = exports.TestCaseRecorderImpl = exports.OAuthExpressErrorHandler = exports.ExpressResponseWriter = exports.RecordingFilter = exports.PreConsumedBodyReader = exports.StreamBodyReader = exports.WebpiecesMiddleware = exports.WebpiecesExpressRouter = void 0;
|
|
4
4
|
// Express adapter (the only place express lifecycle lives) over the node-only ApiFactory
|
|
5
5
|
var WebpiecesExpressRouter_1 = require("./WebpiecesExpressRouter");
|
|
6
6
|
Object.defineProperty(exports, "WebpiecesExpressRouter", { enumerable: true, get: function () { return WebpiecesExpressRouter_1.WebpiecesExpressRouter; } });
|
|
@@ -20,6 +20,9 @@ Object.defineProperty(exports, "RecordingFilter", { enumerable: true, get: funct
|
|
|
20
20
|
// plus one header") rather than copying its status-to-message table.
|
|
21
21
|
var ExpressResponseWriter_1 = require("./ExpressResponseWriter");
|
|
22
22
|
Object.defineProperty(exports, "ExpressResponseWriter", { enumerable: true, get: function () { return ExpressResponseWriter_1.ExpressResponseWriter; } });
|
|
23
|
+
// RFC 6749/6750 rendering + INFO logging of an OAuthProtocolError on an app's raw express OAuth routes.
|
|
24
|
+
var OAuthExpressErrorHandler_1 = require("./OAuthExpressErrorHandler");
|
|
25
|
+
Object.defineProperty(exports, "OAuthExpressErrorHandler", { enumerable: true, get: function () { return OAuthExpressErrorHandler_1.OAuthExpressErrorHandler; } });
|
|
23
26
|
// How ApiEndUserError is answered: 'gui' (266, default) or 'edge' (its edgeHttpStatus, else 400).
|
|
24
27
|
// Test-case recording (contract lives in @webpieces/core-util)
|
|
25
28
|
var TestCaseRecorderImpl_1 = require("./recorder/TestCaseRecorderImpl");
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/http/http-server/src/index.ts"],"names":[],"mappings":";;;AAAA,yFAAyF;AACzF,mEAAkE;AAAzD,gIAAA,sBAAsB,OAAA;AAC/B,6DAA4D;AAAnD,0HAAA,mBAAmB,OAAA;AAI5B,4DAA2D;AAAlD,oHAAA,gBAAgB,OAAA;AACzB,sEAAqE;AAA5D,8HAAA,qBAAqB,OAAA;AAC9B,gGAAgG;AAChG,+FAA+F;AAC/F,+FAA+F;AAC/F,6DAA4D;AAAnD,kHAAA,eAAe,OAAA;AAExB,4FAA4F;AAC5F,mGAAmG;AACnG,qEAAqE;AACrE,iEAAgE;AAAvD,8HAAA,qBAAqB,OAAA;AAC9B,kGAAkG;AAElG,+DAA+D;AAC/D,wEAAuE;AAA9D,4HAAA,oBAAoB,OAAA;AAC7B,0DAAyD;AAAhD,8GAAA,aAAa,OAAA;AACtB,oDAAmD;AAA1C,wGAAA,UAAU,OAAA;AAEnB,mEAAmE;AACnE,uEAAsE;AAA7D,4HAAA,oBAAoB,OAAA;AAC7B,kDAAsD;AAA7C,2GAAA,cAAc,OAAA;AAEvB,gEAAgE;AAChE,wDAYiC;AAX7B,4GAAA,YAAY,OAAA;AACZ,0GAAA,UAAU,OAAA;AAEV,6GAAA,aAAa,OAAA;AACb,gHAAA,gBAAgB,OAAA;AAEhB,yGAAA,SAAS,OAAA;AACT,2GAAA,WAAW,OAAA;AACX,0GAAA,UAAU,OAAA;AACV,mHAAA,mBAAmB,OAAA;AACnB,6GAAA,aAAa,OAAA","sourcesContent":["// Express adapter (the only place express lifecycle lives) over the node-only ApiFactory\nexport { WebpiecesExpressRouter } from './WebpiecesExpressRouter';\nexport { WebpiecesMiddleware } from './WebpiecesMiddleware';\n// How routes read the body bytes: stream (default) or a host's pre-consumed req.rawBody (issue #937).\n// Chosen via WebpiecesExpressRouter.setBodyReader(...) before bindExpress(app).\nexport { RequestBodyReader } from './body/RequestBodyReader';\nexport { StreamBodyReader } from './body/StreamBodyReader';\nexport { PreConsumedBodyReader } from './body/PreConsumedBodyReader';\n// LogApiFilter is now a FIXED framework filter auto-installed by WebpiecesRouter (outermost, at\n// priority 1,000,000, above AuthFilter). Apps must NOT install it themselves — it is no longer\n// exported here. Remove any `router.addFilter(new FilterDefinition(1800, LogApiFilter, '*'))`.\nexport { RecordingFilter } from './filters/RecordingFilter';\n\n// The webpieces DEFAULT error response, exported as a DELEGABLE object: it returns the same\n// HttpResponseDto an app's ErrorTranslator.toWire returns, so an app wraps it (\"webpieces' answer,\n// plus one header\") rather than copying its status-to-message table.\nexport { ExpressResponseWriter } from './ExpressResponseWriter';\n// How ApiEndUserError is answered: 'gui' (266, default) or 'edge' (its edgeHttpStatus, else 400).\n\n// Test-case recording (contract lives in @webpieces/core-util)\nexport { TestCaseRecorderImpl } from './recorder/TestCaseRecorderImpl';\nexport { SpecGenerator } from './recorder/SpecGenerator';\nexport { recordable } from './recorder/recordable';\n\n// Context keys + registry (the global magic-context header system)\nexport { WebpiecesCoreHeaders } from './headers/WebpiecesCoreHeaders';\nexport { HeaderRegistry } from '@webpieces/core-util';\n\n// Re-export from http-routing for one-import adapter ergonomics\nexport {\n RouteHandler,\n MethodMeta,\n HttpFilter,\n FilterMatcher,\n FilterDefinition,\n ApiFactory,\n ApiClient,\n HttpRequest,\n AuthConfig,\n AuthenticatedCaller,\n SharedSecrets,\n} from '@webpieces/http-routing';\n// ExpressRouteHandler now lives in http-server (express adapter), not node-only http-routing\nexport { ExpressRouteHandler } from './WebpiecesMiddleware';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/http/http-server/src/index.ts"],"names":[],"mappings":";;;AAAA,yFAAyF;AACzF,mEAAkE;AAAzD,gIAAA,sBAAsB,OAAA;AAC/B,6DAA4D;AAAnD,0HAAA,mBAAmB,OAAA;AAI5B,4DAA2D;AAAlD,oHAAA,gBAAgB,OAAA;AACzB,sEAAqE;AAA5D,8HAAA,qBAAqB,OAAA;AAC9B,gGAAgG;AAChG,+FAA+F;AAC/F,+FAA+F;AAC/F,6DAA4D;AAAnD,kHAAA,eAAe,OAAA;AAExB,4FAA4F;AAC5F,mGAAmG;AACnG,qEAAqE;AACrE,iEAAgE;AAAvD,8HAAA,qBAAqB,OAAA;AAC9B,wGAAwG;AACxG,uEAAsE;AAA7D,oIAAA,wBAAwB,OAAA;AACjC,kGAAkG;AAElG,+DAA+D;AAC/D,wEAAuE;AAA9D,4HAAA,oBAAoB,OAAA;AAC7B,0DAAyD;AAAhD,8GAAA,aAAa,OAAA;AACtB,oDAAmD;AAA1C,wGAAA,UAAU,OAAA;AAEnB,mEAAmE;AACnE,uEAAsE;AAA7D,4HAAA,oBAAoB,OAAA;AAC7B,kDAAsD;AAA7C,2GAAA,cAAc,OAAA;AAEvB,gEAAgE;AAChE,wDAYiC;AAX7B,4GAAA,YAAY,OAAA;AACZ,0GAAA,UAAU,OAAA;AAEV,6GAAA,aAAa,OAAA;AACb,gHAAA,gBAAgB,OAAA;AAEhB,yGAAA,SAAS,OAAA;AACT,2GAAA,WAAW,OAAA;AACX,0GAAA,UAAU,OAAA;AACV,mHAAA,mBAAmB,OAAA;AACnB,6GAAA,aAAa,OAAA","sourcesContent":["// Express adapter (the only place express lifecycle lives) over the node-only ApiFactory\nexport { WebpiecesExpressRouter } from './WebpiecesExpressRouter';\nexport { WebpiecesMiddleware } from './WebpiecesMiddleware';\n// How routes read the body bytes: stream (default) or a host's pre-consumed req.rawBody (issue #937).\n// Chosen via WebpiecesExpressRouter.setBodyReader(...) before bindExpress(app).\nexport { RequestBodyReader } from './body/RequestBodyReader';\nexport { StreamBodyReader } from './body/StreamBodyReader';\nexport { PreConsumedBodyReader } from './body/PreConsumedBodyReader';\n// LogApiFilter is now a FIXED framework filter auto-installed by WebpiecesRouter (outermost, at\n// priority 1,000,000, above AuthFilter). Apps must NOT install it themselves — it is no longer\n// exported here. Remove any `router.addFilter(new FilterDefinition(1800, LogApiFilter, '*'))`.\nexport { RecordingFilter } from './filters/RecordingFilter';\n\n// The webpieces DEFAULT error response, exported as a DELEGABLE object: it returns the same\n// HttpResponseDto an app's ErrorTranslator.toWire returns, so an app wraps it (\"webpieces' answer,\n// plus one header\") rather than copying its status-to-message table.\nexport { ExpressResponseWriter } from './ExpressResponseWriter';\n// RFC 6749/6750 rendering + INFO logging of an OAuthProtocolError on an app's raw express OAuth routes.\nexport { OAuthExpressErrorHandler } from './OAuthExpressErrorHandler';\n// How ApiEndUserError is answered: 'gui' (266, default) or 'edge' (its edgeHttpStatus, else 400).\n\n// Test-case recording (contract lives in @webpieces/core-util)\nexport { TestCaseRecorderImpl } from './recorder/TestCaseRecorderImpl';\nexport { SpecGenerator } from './recorder/SpecGenerator';\nexport { recordable } from './recorder/recordable';\n\n// Context keys + registry (the global magic-context header system)\nexport { WebpiecesCoreHeaders } from './headers/WebpiecesCoreHeaders';\nexport { HeaderRegistry } from '@webpieces/core-util';\n\n// Re-export from http-routing for one-import adapter ergonomics\nexport {\n RouteHandler,\n MethodMeta,\n HttpFilter,\n FilterMatcher,\n FilterDefinition,\n ApiFactory,\n ApiClient,\n HttpRequest,\n AuthConfig,\n AuthenticatedCaller,\n SharedSecrets,\n} from '@webpieces/http-routing';\n// ExpressRouteHandler now lives in http-server (express adapter), not node-only http-routing\nexport { ExpressRouteHandler } from './WebpiecesMiddleware';\n"]}
|