@atxp/server 0.2.22 → 0.3.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/dist/_virtual/_commonjsHelpers.js +8 -0
- package/dist/_virtual/_commonjsHelpers.js.map +1 -0
- package/dist/_virtual/bom-handling.js +4 -0
- package/dist/_virtual/bom-handling.js.map +1 -0
- package/dist/_virtual/dbcs-codec.js +4 -0
- package/dist/_virtual/dbcs-codec.js.map +1 -0
- package/dist/_virtual/index.js +8 -0
- package/dist/_virtual/index.js.map +1 -0
- package/dist/_virtual/index2.js +4 -0
- package/dist/_virtual/index2.js.map +1 -0
- package/dist/_virtual/index3.js +4 -0
- package/dist/_virtual/index3.js.map +1 -0
- package/dist/_virtual/index4.js +4 -0
- package/dist/_virtual/index4.js.map +1 -0
- package/dist/_virtual/index5.js +4 -0
- package/dist/_virtual/index5.js.map +1 -0
- package/dist/_virtual/inherits.js +4 -0
- package/dist/_virtual/inherits.js.map +1 -0
- package/dist/_virtual/inherits_browser.js +4 -0
- package/dist/_virtual/inherits_browser.js.map +1 -0
- package/dist/_virtual/sbcs-codec.js +4 -0
- package/dist/_virtual/sbcs-codec.js.map +1 -0
- package/dist/_virtual/utf16.js +4 -0
- package/dist/_virtual/utf16.js.map +1 -0
- package/dist/_virtual/utf32.js +4 -0
- package/dist/_virtual/utf32.js.map +1 -0
- package/dist/_virtual/utf7.js +4 -0
- package/dist/_virtual/utf7.js.map +1 -0
- package/dist/atxpContext.js +9 -6
- package/dist/atxpContext.js.map +1 -1
- package/dist/atxpServer.js +19 -27
- package/dist/atxpServer.js.map +1 -1
- package/dist/core/mcp.js +39 -0
- package/dist/core/mcp.js.map +1 -0
- package/dist/{oAuthChallenge.js → core/oauth.js} +21 -12
- package/dist/core/oauth.js.map +1 -0
- package/dist/{token.js → core/token.js} +13 -7
- package/dist/core/token.js.map +1 -0
- package/dist/getResource.js +5 -3
- package/dist/getResource.js.map +1 -1
- package/dist/index.cjs +13727 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +141 -5
- package/dist/index.js +13708 -5
- package/dist/index.js.map +1 -1
- package/dist/{http.js → node/http.js} +21 -20
- package/dist/node/http.js.map +1 -0
- package/dist/node/oauth.js +23 -0
- package/dist/node/oauth.js.map +1 -0
- package/dist/node/token.js +15 -0
- package/dist/node/token.js.map +1 -0
- package/dist/node_modules/bytes/index.js +181 -0
- package/dist/node_modules/bytes/index.js.map +1 -0
- package/dist/node_modules/depd/index.js +551 -0
- package/dist/node_modules/depd/index.js.map +1 -0
- package/dist/node_modules/http-errors/index.js +307 -0
- package/dist/node_modules/http-errors/index.js.map +1 -0
- package/dist/node_modules/iconv-lite/encodings/dbcs-codec.js +599 -0
- package/dist/node_modules/iconv-lite/encodings/dbcs-codec.js.map +1 -0
- package/dist/node_modules/iconv-lite/encodings/dbcs-data.js +207 -0
- package/dist/node_modules/iconv-lite/encodings/dbcs-data.js.map +1 -0
- package/dist/node_modules/iconv-lite/encodings/index.js +45 -0
- package/dist/node_modules/iconv-lite/encodings/index.js.map +1 -0
- package/dist/node_modules/iconv-lite/encodings/internal.js +211 -0
- package/dist/node_modules/iconv-lite/encodings/internal.js.map +1 -0
- package/dist/node_modules/iconv-lite/encodings/sbcs-codec.js +84 -0
- package/dist/node_modules/iconv-lite/encodings/sbcs-codec.js.map +1 -0
- package/dist/node_modules/iconv-lite/encodings/sbcs-data-generated.js +461 -0
- package/dist/node_modules/iconv-lite/encodings/sbcs-data-generated.js.map +1 -0
- package/dist/node_modules/iconv-lite/encodings/sbcs-data.js +188 -0
- package/dist/node_modules/iconv-lite/encodings/sbcs-data.js.map +1 -0
- package/dist/node_modules/iconv-lite/encodings/tables/big5-added.json.js +507 -0
- package/dist/node_modules/iconv-lite/encodings/tables/big5-added.json.js.map +1 -0
- package/dist/node_modules/iconv-lite/encodings/tables/cp936.json.js +2622 -0
- package/dist/node_modules/iconv-lite/encodings/tables/cp936.json.js.map +1 -0
- package/dist/node_modules/iconv-lite/encodings/tables/cp949.json.js +2381 -0
- package/dist/node_modules/iconv-lite/encodings/tables/cp949.json.js.map +1 -0
- package/dist/node_modules/iconv-lite/encodings/tables/cp950.json.js +730 -0
- package/dist/node_modules/iconv-lite/encodings/tables/cp950.json.js.map +1 -0
- package/dist/node_modules/iconv-lite/encodings/tables/eucjp.json.js +823 -0
- package/dist/node_modules/iconv-lite/encodings/tables/eucjp.json.js.map +1 -0
- package/dist/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json.js +425 -0
- package/dist/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json.js.map +1 -0
- package/dist/node_modules/iconv-lite/encodings/tables/gbk-added.json.js +265 -0
- package/dist/node_modules/iconv-lite/encodings/tables/gbk-added.json.js.map +1 -0
- package/dist/node_modules/iconv-lite/encodings/tables/shiftjis.json.js +549 -0
- package/dist/node_modules/iconv-lite/encodings/tables/shiftjis.json.js.map +1 -0
- package/dist/node_modules/iconv-lite/encodings/utf16.js +207 -0
- package/dist/node_modules/iconv-lite/encodings/utf16.js.map +1 -0
- package/dist/node_modules/iconv-lite/encodings/utf32.js +330 -0
- package/dist/node_modules/iconv-lite/encodings/utf32.js.map +1 -0
- package/dist/node_modules/iconv-lite/encodings/utf7.js +298 -0
- package/dist/node_modules/iconv-lite/encodings/utf7.js.map +1 -0
- package/dist/node_modules/iconv-lite/lib/bom-handling.js +62 -0
- package/dist/node_modules/iconv-lite/lib/bom-handling.js.map +1 -0
- package/dist/node_modules/iconv-lite/lib/index.js +193 -0
- package/dist/node_modules/iconv-lite/lib/index.js.map +1 -0
- package/dist/node_modules/iconv-lite/lib/streams.js +121 -0
- package/dist/node_modules/iconv-lite/lib/streams.js.map +1 -0
- package/dist/node_modules/inherits/inherits.js +22 -0
- package/dist/node_modules/inherits/inherits.js.map +1 -0
- package/dist/node_modules/inherits/inherits_browser.js +39 -0
- package/dist/node_modules/inherits/inherits_browser.js.map +1 -0
- package/dist/node_modules/raw-body/index.js +352 -0
- package/dist/node_modules/raw-body/index.js.map +1 -0
- package/dist/node_modules/safer-buffer/safer.js +89 -0
- package/dist/node_modules/safer-buffer/safer.js.map +1 -0
- package/dist/node_modules/setprototypeof/index.js +27 -0
- package/dist/node_modules/setprototypeof/index.js.map +1 -0
- package/dist/node_modules/statuses/codes.json.js +68 -0
- package/dist/node_modules/statuses/codes.json.js.map +1 -0
- package/dist/node_modules/statuses/index.js +158 -0
- package/dist/node_modules/statuses/index.js.map +1 -0
- package/dist/node_modules/toidentifier/index.js +42 -0
- package/dist/node_modules/toidentifier/index.js.map +1 -0
- package/dist/node_modules/unpipe/index.js +79 -0
- package/dist/node_modules/unpipe/index.js.map +1 -0
- package/dist/oAuthMetadata.js +7 -4
- package/dist/oAuthMetadata.js.map +1 -1
- package/dist/paymentServer.js +5 -20
- package/dist/paymentServer.js.map +1 -1
- package/dist/protectedResourceMetadata.js +7 -4
- package/dist/protectedResourceMetadata.js.map +1 -1
- package/dist/requirePayment.js +7 -4
- package/dist/requirePayment.js.map +1 -1
- package/dist/types.js +4 -2
- package/dist/types.js.map +1 -1
- package/dist/webapi/mcp.js +25 -0
- package/dist/webapi/mcp.js.map +1 -0
- package/dist/webapi/oauth.js +21 -0
- package/dist/webapi/oauth.js.map +1 -0
- package/dist/webapi/token.js +15 -0
- package/dist/webapi/token.js.map +1 -0
- package/package.json +21 -7
- package/dist/atxpContext.d.ts +0 -6
- package/dist/atxpContext.d.ts.map +0 -1
- package/dist/atxpServer.d.ts +0 -12
- package/dist/atxpServer.d.ts.map +0 -1
- package/dist/getResource.d.ts +0 -4
- package/dist/getResource.d.ts.map +0 -1
- package/dist/http.d.ts +0 -7
- package/dist/http.d.ts.map +0 -1
- package/dist/http.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/oAuthChallenge.d.ts +0 -4
- package/dist/oAuthChallenge.d.ts.map +0 -1
- package/dist/oAuthChallenge.js.map +0 -1
- package/dist/oAuthMetadata.d.ts +0 -6
- package/dist/oAuthMetadata.d.ts.map +0 -1
- package/dist/paymentServer.d.ts +0 -62
- package/dist/paymentServer.d.ts.map +0 -1
- package/dist/protectedResourceMetadata.d.ts +0 -5
- package/dist/protectedResourceMetadata.d.ts.map +0 -1
- package/dist/requirePayment.d.ts +0 -3
- package/dist/requirePayment.d.ts.map +0 -1
- package/dist/serverTestHelpers.d.ts +0 -55
- package/dist/serverTestHelpers.d.ts.map +0 -1
- package/dist/serverTestHelpers.js +0 -88
- package/dist/serverTestHelpers.js.map +0 -1
- package/dist/token.d.ts +0 -4
- package/dist/token.d.ts.map +0 -1
- package/dist/token.js.map +0 -1
- package/dist/types.d.ts +0 -60
- package/dist/types.d.ts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"safer.js","sources":["../../../../../node_modules/safer-buffer/safer.js"],"sourcesContent":["/* eslint-disable node/no-deprecated-api */\n\n'use strict'\n\nvar buffer = require('buffer')\nvar Buffer = buffer.Buffer\n\nvar safer = {}\n\nvar key\n\nfor (key in buffer) {\n if (!buffer.hasOwnProperty(key)) continue\n if (key === 'SlowBuffer' || key === 'Buffer') continue\n safer[key] = buffer[key]\n}\n\nvar Safer = safer.Buffer = {}\nfor (key in Buffer) {\n if (!Buffer.hasOwnProperty(key)) continue\n if (key === 'allocUnsafe' || key === 'allocUnsafeSlow') continue\n Safer[key] = Buffer[key]\n}\n\nsafer.Buffer.prototype = Buffer.prototype\n\nif (!Safer.from || Safer.from === Uint8Array.from) {\n Safer.from = function (value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('The \"value\" argument must not be of type number. Received type ' + typeof value)\n }\n if (value && typeof value.length === 'undefined') {\n throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + typeof value)\n }\n return Buffer(value, encodingOrOffset, length)\n }\n}\n\nif (!Safer.alloc) {\n Safer.alloc = function (size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new TypeError('The \"size\" argument must be of type number. Received type ' + typeof size)\n }\n if (size < 0 || size >= 2 * (1 << 30)) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n var buf = Buffer(size)\n if (!fill || fill.length === 0) {\n buf.fill(0)\n } else if (typeof encoding === 'string') {\n buf.fill(fill, encoding)\n } else {\n buf.fill(fill)\n }\n return buf\n }\n}\n\nif (!safer.kStringMaxLength) {\n try {\n safer.kStringMaxLength = process.binding('buffer').kStringMaxLength\n } catch (e) {\n // we can't determine kStringMaxLength in environments where process.binding\n // is unsupported, so let's not set it\n }\n}\n\nif (!safer.constants) {\n safer.constants = {\n MAX_LENGTH: safer.kMaxLength\n }\n if (safer.kStringMaxLength) {\n safer.constants.MAX_STRING_LENGTH = safer.kStringMaxLength\n }\n}\n\nmodule.exports = safer\n"],"names":[],"mappings":";;;;;;;;;;;AAIA,CAAA,IAAI,MAAM,GAAG;CACb,IAAI,MAAM,GAAG,MAAM,CAAC;;AAEpB,CAAA,IAAI,KAAK,GAAG;;CAEZ,IAAI;;CAEJ,KAAK,GAAG,IAAI,MAAM,EAAE;GAClB,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;GACjC,IAAI,GAAG,KAAK,YAAY,IAAI,GAAG,KAAK,QAAQ,EAAE;AAChD,GAAE,KAAK,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG;AACzB,CAAA;;AAEA,CAAA,IAAI,KAAK,GAAG,KAAK,CAAC,MAAM,GAAG;CAC3B,KAAK,GAAG,IAAI,MAAM,EAAE;GAClB,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;GACjC,IAAI,GAAG,KAAK,aAAa,IAAI,GAAG,KAAK,iBAAiB,EAAE;AAC1D,GAAE,KAAK,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG;AACzB,CAAA;;AAEA,CAAA,KAAK,CAAC,MAAM,CAAC,SAAS,GAAG,MAAM,CAAC;;AAEhC,CAAA,IAAI,CAAC,KAAK,CAAC,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AAC,IAAI;AACnB,KAAA;AACA,KAAI,OAAO;AACX,GAAA;AACA,CAAA;;AAEA,CAAA,IAAI,CAAC,KAAK,CAAC,gBAAgB,EAAE;AAC7B,GAAE,IAAI;KACF,KAAK,CAAC,gBAAgB,GAAG,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;GACvD,CAAG,CAAC,OAAO,CAAC,EAAE;AACd;AACA;AACA,GAAA;AACA,CAAA;;AAEA,CAAA,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE;GACpB,KAAK,CAAC,SAAS,GAAG;KAChB,UAAU,EAAE,KAAK,CAAC;AACtB;AACA,GAAE,IAAI,KAAK,CAAC,gBAAgB,EAAE;AAC9B,KAAI,KAAK,CAAC,SAAS,CAAC,iBAAiB,GAAG,KAAK,CAAC;AAC9C,GAAA;AACA,CAAA;;AAEA,CAAA,OAAc,GAAG;;;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
var setprototypeof;
|
|
2
|
+
var hasRequiredSetprototypeof;
|
|
3
|
+
|
|
4
|
+
function requireSetprototypeof () {
|
|
5
|
+
if (hasRequiredSetprototypeof) return setprototypeof;
|
|
6
|
+
hasRequiredSetprototypeof = 1;
|
|
7
|
+
/* eslint no-proto: 0 */
|
|
8
|
+
setprototypeof = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array ? setProtoOf : mixinProperties);
|
|
9
|
+
|
|
10
|
+
function setProtoOf (obj, proto) {
|
|
11
|
+
obj.__proto__ = proto;
|
|
12
|
+
return obj
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function mixinProperties (obj, proto) {
|
|
16
|
+
for (var prop in proto) {
|
|
17
|
+
if (!Object.prototype.hasOwnProperty.call(obj, prop)) {
|
|
18
|
+
obj[prop] = proto[prop];
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return obj
|
|
22
|
+
}
|
|
23
|
+
return setprototypeof;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export { requireSetprototypeof as __require };
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../node_modules/setprototypeof/index.js"],"sourcesContent":["'use strict'\n/* eslint no-proto: 0 */\nmodule.exports = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array ? setProtoOf : mixinProperties)\n\nfunction setProtoOf (obj, proto) {\n obj.__proto__ = proto\n return obj\n}\n\nfunction mixinProperties (obj, proto) {\n for (var prop in proto) {\n if (!Object.prototype.hasOwnProperty.call(obj, prop)) {\n obj[prop] = proto[prop]\n }\n }\n return obj\n}\n"],"names":[],"mappings":";;;;;;AACA;AACA,CAAA,cAAc,GAAG,MAAM,CAAC,cAAc,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY,KAAK,GAAG,UAAU,GAAG,eAAe;;AAE5G,CAAA,SAAS,UAAU,EAAE,GAAG,EAAE,KAAK,EAAE;GAC/B,GAAG,CAAC,SAAS,GAAG;AAClB,GAAE,OAAO;AACT,CAAA;;AAEA,CAAA,SAAS,eAAe,EAAE,GAAG,EAAE,KAAK,EAAE;AACtC,GAAE,KAAK,IAAI,IAAI,IAAI,KAAK,EAAE;AAC1B,KAAI,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE;AAC1D,OAAM,GAAG,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI;AAC5B,KAAA;AACA,GAAA;AACA,GAAE,OAAO;AACT,CAAA;;;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
var require$$0 = {
|
|
2
|
+
"100": "Continue",
|
|
3
|
+
"101": "Switching Protocols",
|
|
4
|
+
"102": "Processing",
|
|
5
|
+
"103": "Early Hints",
|
|
6
|
+
"200": "OK",
|
|
7
|
+
"201": "Created",
|
|
8
|
+
"202": "Accepted",
|
|
9
|
+
"203": "Non-Authoritative Information",
|
|
10
|
+
"204": "No Content",
|
|
11
|
+
"205": "Reset Content",
|
|
12
|
+
"206": "Partial Content",
|
|
13
|
+
"207": "Multi-Status",
|
|
14
|
+
"208": "Already Reported",
|
|
15
|
+
"226": "IM Used",
|
|
16
|
+
"300": "Multiple Choices",
|
|
17
|
+
"301": "Moved Permanently",
|
|
18
|
+
"302": "Found",
|
|
19
|
+
"303": "See Other",
|
|
20
|
+
"304": "Not Modified",
|
|
21
|
+
"305": "Use Proxy",
|
|
22
|
+
"307": "Temporary Redirect",
|
|
23
|
+
"308": "Permanent Redirect",
|
|
24
|
+
"400": "Bad Request",
|
|
25
|
+
"401": "Unauthorized",
|
|
26
|
+
"402": "Payment Required",
|
|
27
|
+
"403": "Forbidden",
|
|
28
|
+
"404": "Not Found",
|
|
29
|
+
"405": "Method Not Allowed",
|
|
30
|
+
"406": "Not Acceptable",
|
|
31
|
+
"407": "Proxy Authentication Required",
|
|
32
|
+
"408": "Request Timeout",
|
|
33
|
+
"409": "Conflict",
|
|
34
|
+
"410": "Gone",
|
|
35
|
+
"411": "Length Required",
|
|
36
|
+
"412": "Precondition Failed",
|
|
37
|
+
"413": "Payload Too Large",
|
|
38
|
+
"414": "URI Too Long",
|
|
39
|
+
"415": "Unsupported Media Type",
|
|
40
|
+
"416": "Range Not Satisfiable",
|
|
41
|
+
"417": "Expectation Failed",
|
|
42
|
+
"418": "I'm a Teapot",
|
|
43
|
+
"421": "Misdirected Request",
|
|
44
|
+
"422": "Unprocessable Entity",
|
|
45
|
+
"423": "Locked",
|
|
46
|
+
"424": "Failed Dependency",
|
|
47
|
+
"425": "Too Early",
|
|
48
|
+
"426": "Upgrade Required",
|
|
49
|
+
"428": "Precondition Required",
|
|
50
|
+
"429": "Too Many Requests",
|
|
51
|
+
"431": "Request Header Fields Too Large",
|
|
52
|
+
"451": "Unavailable For Legal Reasons",
|
|
53
|
+
"500": "Internal Server Error",
|
|
54
|
+
"501": "Not Implemented",
|
|
55
|
+
"502": "Bad Gateway",
|
|
56
|
+
"503": "Service Unavailable",
|
|
57
|
+
"504": "Gateway Timeout",
|
|
58
|
+
"505": "HTTP Version Not Supported",
|
|
59
|
+
"506": "Variant Also Negotiates",
|
|
60
|
+
"507": "Insufficient Storage",
|
|
61
|
+
"508": "Loop Detected",
|
|
62
|
+
"509": "Bandwidth Limit Exceeded",
|
|
63
|
+
"510": "Not Extended",
|
|
64
|
+
"511": "Network Authentication Required"
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export { require$$0 as default };
|
|
68
|
+
//# sourceMappingURL=codes.json.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codes.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import require$$0 from './codes.json.js';
|
|
2
|
+
|
|
3
|
+
/*!
|
|
4
|
+
* statuses
|
|
5
|
+
* Copyright(c) 2014 Jonathan Ong
|
|
6
|
+
* Copyright(c) 2016 Douglas Christopher Wilson
|
|
7
|
+
* MIT Licensed
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
var statuses;
|
|
11
|
+
var hasRequiredStatuses;
|
|
12
|
+
|
|
13
|
+
function requireStatuses () {
|
|
14
|
+
if (hasRequiredStatuses) return statuses;
|
|
15
|
+
hasRequiredStatuses = 1;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Module dependencies.
|
|
19
|
+
* @private
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
var codes = require$$0;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Module exports.
|
|
26
|
+
* @public
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
statuses = status;
|
|
30
|
+
|
|
31
|
+
// status code to message map
|
|
32
|
+
status.message = codes;
|
|
33
|
+
|
|
34
|
+
// status message (lower-case) to code map
|
|
35
|
+
status.code = createMessageToStatusCodeMap(codes);
|
|
36
|
+
|
|
37
|
+
// array of status codes
|
|
38
|
+
status.codes = createStatusCodeList(codes);
|
|
39
|
+
|
|
40
|
+
// status codes for redirects
|
|
41
|
+
status.redirect = {
|
|
42
|
+
300: true,
|
|
43
|
+
301: true,
|
|
44
|
+
302: true,
|
|
45
|
+
303: true,
|
|
46
|
+
305: true,
|
|
47
|
+
307: true,
|
|
48
|
+
308: true
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
// status codes for empty bodies
|
|
52
|
+
status.empty = {
|
|
53
|
+
204: true,
|
|
54
|
+
205: true,
|
|
55
|
+
304: true
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
// status codes for when you should retry the request
|
|
59
|
+
status.retry = {
|
|
60
|
+
502: true,
|
|
61
|
+
503: true,
|
|
62
|
+
504: true
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Create a map of message to status code.
|
|
67
|
+
* @private
|
|
68
|
+
*/
|
|
69
|
+
|
|
70
|
+
function createMessageToStatusCodeMap (codes) {
|
|
71
|
+
var map = {};
|
|
72
|
+
|
|
73
|
+
Object.keys(codes).forEach(function forEachCode (code) {
|
|
74
|
+
var message = codes[code];
|
|
75
|
+
var status = Number(code);
|
|
76
|
+
|
|
77
|
+
// populate map
|
|
78
|
+
map[message.toLowerCase()] = status;
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
return map
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Create a list of all status codes.
|
|
86
|
+
* @private
|
|
87
|
+
*/
|
|
88
|
+
|
|
89
|
+
function createStatusCodeList (codes) {
|
|
90
|
+
return Object.keys(codes).map(function mapCode (code) {
|
|
91
|
+
return Number(code)
|
|
92
|
+
})
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Get the status code for given message.
|
|
97
|
+
* @private
|
|
98
|
+
*/
|
|
99
|
+
|
|
100
|
+
function getStatusCode (message) {
|
|
101
|
+
var msg = message.toLowerCase();
|
|
102
|
+
|
|
103
|
+
if (!Object.prototype.hasOwnProperty.call(status.code, msg)) {
|
|
104
|
+
throw new Error('invalid status message: "' + message + '"')
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
return status.code[msg]
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Get the status message for given code.
|
|
112
|
+
* @private
|
|
113
|
+
*/
|
|
114
|
+
|
|
115
|
+
function getStatusMessage (code) {
|
|
116
|
+
if (!Object.prototype.hasOwnProperty.call(status.message, code)) {
|
|
117
|
+
throw new Error('invalid status code: ' + code)
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
return status.message[code]
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Get the status code.
|
|
125
|
+
*
|
|
126
|
+
* Given a number, this will throw if it is not a known status
|
|
127
|
+
* code, otherwise the code will be returned. Given a string,
|
|
128
|
+
* the string will be parsed for a number and return the code
|
|
129
|
+
* if valid, otherwise will lookup the code assuming this is
|
|
130
|
+
* the status message.
|
|
131
|
+
*
|
|
132
|
+
* @param {string|number} code
|
|
133
|
+
* @returns {number}
|
|
134
|
+
* @public
|
|
135
|
+
*/
|
|
136
|
+
|
|
137
|
+
function status (code) {
|
|
138
|
+
if (typeof code === 'number') {
|
|
139
|
+
return getStatusMessage(code)
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
if (typeof code !== 'string') {
|
|
143
|
+
throw new TypeError('code must be a number or string')
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// '403'
|
|
147
|
+
var n = parseInt(code, 10);
|
|
148
|
+
if (!isNaN(n)) {
|
|
149
|
+
return getStatusMessage(n)
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
return getStatusCode(code)
|
|
153
|
+
}
|
|
154
|
+
return statuses;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export { requireStatuses as __require };
|
|
158
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../node_modules/statuses/index.js"],"sourcesContent":["/*!\n * statuses\n * Copyright(c) 2014 Jonathan Ong\n * Copyright(c) 2016 Douglas Christopher Wilson\n * MIT Licensed\n */\n\n'use strict'\n\n/**\n * Module dependencies.\n * @private\n */\n\nvar codes = require('./codes.json')\n\n/**\n * Module exports.\n * @public\n */\n\nmodule.exports = status\n\n// status code to message map\nstatus.message = codes\n\n// status message (lower-case) to code map\nstatus.code = createMessageToStatusCodeMap(codes)\n\n// array of status codes\nstatus.codes = createStatusCodeList(codes)\n\n// status codes for redirects\nstatus.redirect = {\n 300: true,\n 301: true,\n 302: true,\n 303: true,\n 305: true,\n 307: true,\n 308: true\n}\n\n// status codes for empty bodies\nstatus.empty = {\n 204: true,\n 205: true,\n 304: true\n}\n\n// status codes for when you should retry the request\nstatus.retry = {\n 502: true,\n 503: true,\n 504: true\n}\n\n/**\n * Create a map of message to status code.\n * @private\n */\n\nfunction createMessageToStatusCodeMap (codes) {\n var map = {}\n\n Object.keys(codes).forEach(function forEachCode (code) {\n var message = codes[code]\n var status = Number(code)\n\n // populate map\n map[message.toLowerCase()] = status\n })\n\n return map\n}\n\n/**\n * Create a list of all status codes.\n * @private\n */\n\nfunction createStatusCodeList (codes) {\n return Object.keys(codes).map(function mapCode (code) {\n return Number(code)\n })\n}\n\n/**\n * Get the status code for given message.\n * @private\n */\n\nfunction getStatusCode (message) {\n var msg = message.toLowerCase()\n\n if (!Object.prototype.hasOwnProperty.call(status.code, msg)) {\n throw new Error('invalid status message: \"' + message + '\"')\n }\n\n return status.code[msg]\n}\n\n/**\n * Get the status message for given code.\n * @private\n */\n\nfunction getStatusMessage (code) {\n if (!Object.prototype.hasOwnProperty.call(status.message, code)) {\n throw new Error('invalid status code: ' + code)\n }\n\n return status.message[code]\n}\n\n/**\n * Get the status code.\n *\n * Given a number, this will throw if it is not a known status\n * code, otherwise the code will be returned. Given a string,\n * the string will be parsed for a number and return the code\n * if valid, otherwise will lookup the code assuming this is\n * the status message.\n *\n * @param {string|number} code\n * @returns {number}\n * @public\n */\n\nfunction status (code) {\n if (typeof code === 'number') {\n return getStatusMessage(code)\n }\n\n if (typeof code !== 'string') {\n throw new TypeError('code must be a number or string')\n }\n\n // '403'\n var n = parseInt(code, 10)\n if (!isNaN(n)) {\n return getStatusMessage(n)\n }\n\n return getStatusCode(code)\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AASA;AACA;AACA;AACA;;AAEA,CAAA,IAAI,KAAK,GAAG;;AAEZ;AACA;AACA;AACA;;AAEA,CAAA,QAAc,GAAG;;AAEjB;CACA,MAAM,CAAC,OAAO,GAAG;;AAEjB;AACA,CAAA,MAAM,CAAC,IAAI,GAAG,4BAA4B,CAAC,KAAK;;AAEhD;AACA,CAAA,MAAM,CAAC,KAAK,GAAG,oBAAoB,CAAC,KAAK;;AAEzC;CACA,MAAM,CAAC,QAAQ,GAAG;GAChB,GAAG,EAAE,IAAI;GACT,GAAG,EAAE,IAAI;GACT,GAAG,EAAE,IAAI;GACT,GAAG,EAAE,IAAI;GACT,GAAG,EAAE,IAAI;GACT,GAAG,EAAE,IAAI;AACX,GAAE,GAAG,EAAE;AACP;;AAEA;CACA,MAAM,CAAC,KAAK,GAAG;GACb,GAAG,EAAE,IAAI;GACT,GAAG,EAAE,IAAI;AACX,GAAE,GAAG,EAAE;AACP;;AAEA;CACA,MAAM,CAAC,KAAK,GAAG;GACb,GAAG,EAAE,IAAI;GACT,GAAG,EAAE,IAAI;AACX,GAAE,GAAG,EAAE;AACP;;AAEA;AACA;AACA;AACA;;CAEA,SAAS,4BAA4B,EAAE,KAAK,EAAE;GAC5C,IAAI,GAAG,GAAG;;AAEZ,GAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,SA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E,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;KAC5B,OAAO,gBAAgB,CAAC,IAAI;AAChC,GAAA;;AAEA,GAAE,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;AAChC,KAAI,MAAM,IAAI,SAAS,CAAC,iCAAiC;AACzD,GAAA;;AAEA;AACA,GAAE,IAAI,CAAC,GAAG,QAAQ,CAAC,IAAI,EAAE,EAAE;AAC3B,GAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;KACb,OAAO,gBAAgB,CAAC,CAAC;AAC7B,GAAA;;GAEE,OAAO,aAAa,CAAC,IAAI;AAC3B,CAAA;;;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* toidentifier
|
|
3
|
+
* Copyright(c) 2016 Douglas Christopher Wilson
|
|
4
|
+
* MIT Licensed
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
var toidentifier;
|
|
8
|
+
var hasRequiredToidentifier;
|
|
9
|
+
|
|
10
|
+
function requireToidentifier () {
|
|
11
|
+
if (hasRequiredToidentifier) return toidentifier;
|
|
12
|
+
hasRequiredToidentifier = 1;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Module exports.
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
toidentifier = toIdentifier;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Trasform the given string into a JavaScript identifier
|
|
23
|
+
*
|
|
24
|
+
* @param {string} str
|
|
25
|
+
* @returns {string}
|
|
26
|
+
* @public
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
function toIdentifier (str) {
|
|
30
|
+
return str
|
|
31
|
+
.split(' ')
|
|
32
|
+
.map(function (token) {
|
|
33
|
+
return token.slice(0, 1).toUpperCase() + token.slice(1)
|
|
34
|
+
})
|
|
35
|
+
.join('')
|
|
36
|
+
.replace(/[^ _0-9a-z]/gi, '')
|
|
37
|
+
}
|
|
38
|
+
return toidentifier;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export { requireToidentifier as __require };
|
|
42
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../node_modules/toidentifier/index.js"],"sourcesContent":["/*!\n * toidentifier\n * Copyright(c) 2016 Douglas Christopher Wilson\n * MIT Licensed\n */\n\n'use strict'\n\n/**\n * Module exports.\n * @public\n */\n\nmodule.exports = toIdentifier\n\n/**\n * Trasform the given string into a JavaScript identifier\n *\n * @param {string} str\n * @returns {string}\n * @public\n */\n\nfunction toIdentifier (str) {\n return str\n .split(' ')\n .map(function (token) {\n return token.slice(0, 1).toUpperCase() + token.slice(1)\n })\n .join('')\n .replace(/[^ _0-9a-z]/gi, '')\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;AAQA;AACA;AACA;AACA;;AAEA,CAAA,YAAc,GAAG;;AAEjB;AACA;AACA;AACA;AACA;AACA;AACA;;CAEA,SAAS,YAAY,EAAE,GAAG,EAAE;AAC5B,GAAE,OAAO;MACJ,KAAK,CAAC,GAAG;AACd,MAAK,GAAG,CAAC,UAAU,KAAK,EAAE;AAC1B,OAAM,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;KAC5D,CAAK;MACA,IAAI,CAAC,EAAE;AACZ,MAAK,OAAO,CAAC,eAAe,EAAE,EAAE;AAChC,CAAA;;;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* unpipe
|
|
3
|
+
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
4
|
+
* MIT Licensed
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
var unpipe_1;
|
|
8
|
+
var hasRequiredUnpipe;
|
|
9
|
+
|
|
10
|
+
function requireUnpipe () {
|
|
11
|
+
if (hasRequiredUnpipe) return unpipe_1;
|
|
12
|
+
hasRequiredUnpipe = 1;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Module exports.
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
unpipe_1 = unpipe;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Determine if there are Node.js pipe-like data listeners.
|
|
23
|
+
* @private
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
function hasPipeDataListeners(stream) {
|
|
27
|
+
var listeners = stream.listeners('data');
|
|
28
|
+
|
|
29
|
+
for (var i = 0; i < listeners.length; i++) {
|
|
30
|
+
if (listeners[i].name === 'ondata') {
|
|
31
|
+
return true
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return false
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Unpipe a stream from all destinations.
|
|
40
|
+
*
|
|
41
|
+
* @param {object} stream
|
|
42
|
+
* @public
|
|
43
|
+
*/
|
|
44
|
+
|
|
45
|
+
function unpipe(stream) {
|
|
46
|
+
if (!stream) {
|
|
47
|
+
throw new TypeError('argument stream is required')
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
if (typeof stream.unpipe === 'function') {
|
|
51
|
+
// new-style
|
|
52
|
+
stream.unpipe();
|
|
53
|
+
return
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// Node.js 0.8 hack
|
|
57
|
+
if (!hasPipeDataListeners(stream)) {
|
|
58
|
+
return
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
var listener;
|
|
62
|
+
var listeners = stream.listeners('close');
|
|
63
|
+
|
|
64
|
+
for (var i = 0; i < listeners.length; i++) {
|
|
65
|
+
listener = listeners[i];
|
|
66
|
+
|
|
67
|
+
if (listener.name !== 'cleanup' && listener.name !== 'onclose') {
|
|
68
|
+
continue
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// invoke the listener
|
|
72
|
+
listener.call(stream);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return unpipe_1;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export { requireUnpipe as __require };
|
|
79
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../node_modules/unpipe/index.js"],"sourcesContent":["/*!\n * unpipe\n * Copyright(c) 2015 Douglas Christopher Wilson\n * MIT Licensed\n */\n\n'use strict'\n\n/**\n * Module exports.\n * @public\n */\n\nmodule.exports = unpipe\n\n/**\n * Determine if there are Node.js pipe-like data listeners.\n * @private\n */\n\nfunction hasPipeDataListeners(stream) {\n var listeners = stream.listeners('data')\n\n for (var i = 0; i < listeners.length; i++) {\n if (listeners[i].name === 'ondata') {\n return true\n }\n }\n\n return false\n}\n\n/**\n * Unpipe a stream from all destinations.\n *\n * @param {object} stream\n * @public\n */\n\nfunction unpipe(stream) {\n if (!stream) {\n throw new TypeError('argument stream is required')\n }\n\n if (typeof stream.unpipe === 'function') {\n // new-style\n stream.unpipe()\n return\n }\n\n // Node.js 0.8 hack\n if (!hasPipeDataListeners(stream)) {\n return\n }\n\n var listener\n var listeners = stream.listeners('close')\n\n for (var i = 0; i < listeners.length; i++) {\n listener = listeners[i]\n\n if (listener.name !== 'cleanup' && listener.name !== 'onclose') {\n continue\n }\n\n // invoke the listener\n listener.call(stream)\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;AAQA;AACA;AACA;AACA;;AAEA,CAAA,QAAc,GAAG;;AAEjB;AACA;AACA;AACA;;CAEA,SAAS,oBAAoB,CAAC,MAAM,EAAE;AACtC,GAAE,IAAI,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC,MAAM;;AAEzC,GAAE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;KACzC,IAAI,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,QAAQ,EAAE;AACxC,OAAM,OAAO;AACb,KAAA;AACA,GAAA;;AAEA,GAAE,OAAO;AACT,CAAA;;AAEA;AACA;AACA;AACA;AACA;AACA;;CAEA,SAAS,MAAM,CAAC,MAAM,EAAE;GACtB,IAAI,CAAC,MAAM,EAAE;AACf,KAAI,MAAM,IAAI,SAAS,CAAC,6BAA6B;AACrD,GAAA;;AAEA,GAAE,IAAI,OAAO,MAAM,CAAC,MAAM,KAAK,UAAU,EAAE;AAC3C;KACI,MAAM,CAAC,MAAM;KACb;AACJ,GAAA;;AAEA;AACA,GAAE,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,EAAE;KACjC;AACJ,GAAA;;AAEA,GAAE,IAAI;AACN,GAAE,IAAI,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC,OAAO;;AAE1C,GAAE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AAC7C,KAAI,QAAQ,GAAG,SAAS,CAAC,CAAC;;AAE1B,KAAI,IAAI,QAAQ,CAAC,IAAI,KAAK,SAAS,IAAI,QAAQ,CAAC,IAAI,KAAK,SAAS,EAAE;OAC9D;AACN,KAAA;;AAEA;AACA,KAAI,QAAQ,CAAC,IAAI,CAAC,MAAM;AACxB,GAAA;AACA,CAAA;;;;;;","x_google_ignoreList":[0]}
|
package/dist/oAuthMetadata.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { getPath } from
|
|
2
|
-
|
|
1
|
+
import { getPath } from './getResource.js';
|
|
2
|
+
|
|
3
|
+
function sendOAuthMetadata(res, metadata) {
|
|
3
4
|
if (!metadata) {
|
|
4
5
|
return false;
|
|
5
6
|
}
|
|
@@ -8,7 +9,7 @@ export function sendOAuthMetadata(res, metadata) {
|
|
|
8
9
|
res.end(JSON.stringify(metadata));
|
|
9
10
|
return true;
|
|
10
11
|
}
|
|
11
|
-
|
|
12
|
+
async function getOAuthMetadata(config, requestUrl) {
|
|
12
13
|
if (isOAuthMetadataRequest(config, requestUrl)) {
|
|
13
14
|
try {
|
|
14
15
|
const authServer = await config.oAuthClient.authorizationServerFromUrl(new URL(config.server));
|
|
@@ -38,4 +39,6 @@ function isOAuthMetadataRequest(config, requestUrl) {
|
|
|
38
39
|
const path = getPath(requestUrl).replace(/\/$/, '');
|
|
39
40
|
return path === '/.well-known/oauth-authorization-server';
|
|
40
41
|
}
|
|
41
|
-
|
|
42
|
+
|
|
43
|
+
export { getOAuthMetadata, sendOAuthMetadata };
|
|
44
|
+
//# sourceMappingURL=oAuthMetadata.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oAuthMetadata.js","
|
|
1
|
+
{"version":3,"file":"oAuthMetadata.js","sources":["../src/oAuthMetadata.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAKM,SAAU,iBAAiB,CAAC,GAAmB,EAAE,QAA0C,EAAA;IAC/F,IAAI,CAAC,QAAQ,EAAE;AACb,QAAA,OAAO,KAAK;IACd;AACA,IAAA,GAAG,CAAC,SAAS,CAAC,cAAc,EAAE,kBAAkB,CAAC;AACjD,IAAA,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC;IAClB,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;AACjC,IAAA,OAAO,IAAI;AACb;AAEO,eAAe,gBAAgB,CAAC,MAAkB,EAAE,UAAe,EAAA;AACxE,IAAA,IAAI,sBAAsB,CAAC,MAAM,EAAE,UAAU,CAAC,EAAE;AAC9C,QAAA,IAAI;AACF,YAAA,MAAM,UAAU,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC,0BAA0B,CAAC,IAAI,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YAE9F,OAAO;gBACL,MAAM,EAAE,MAAM,CAAC,MAAM;gBACrB,sBAAsB,EAAE,UAAU,CAAC,sBAAsB;gBACzD,wBAAwB,EAAE,UAAU,CAAC,wBAAwB;gBAC7D,qBAAqB,EAAE,UAAU,CAAC,qBAAqB;gBACvD,cAAc,EAAE,UAAU,CAAC,cAAc;gBACzC,qCAAqC,EAAE,UAAU,CAAC,qCAAqC;gBACvF,qBAAqB,EAAE,UAAU,CAAC,qBAAqB;gBACvD,mBAAmB,EAAE,UAAU,CAAC,mBAAmB;gBACnD,sBAAsB,EAAE,UAAU,CAAC,sBAAsB;gBACzD,6CAA6C,EAAE,UAAU,CAAC,6CAA6C;gBACvG,gCAAgC,EAAE,UAAU,CAAC,gCAAgC;gBAC7E,gBAAgB,EAAE,UAAU,CAAC;aAC9B;QACH;QAAE,OAAO,KAAK,EAAE;AACd,YAAA,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA,uDAAA,EAA0D,MAAM,CAAC,MAAM,CAAA,EAAA,EAAK,KAAK,CAAA,CAAE,CAAC;AACxG,YAAA,MAAM,KAAK;QACb;IACF;AACA,IAAA,OAAO,IAAI;AACb;AAEA,SAAS,sBAAsB,CAAC,MAAkB,EAAE,UAAe,EAAA;AACjE,IAAA,MAAM,IAAI,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;IACnD,OAAO,IAAI,KAAK,yCAAyC;AAC3D;;;;"}
|
package/dist/paymentServer.js
CHANGED
|
@@ -3,25 +3,17 @@
|
|
|
3
3
|
*
|
|
4
4
|
* This class handles payment operations with the ATXP authorization server.
|
|
5
5
|
*
|
|
6
|
-
* **Required Environment Variable:**
|
|
7
|
-
* - `ATXP_AUTH_CLIENT_TOKEN`: Authentication token for the ATXP authorization server.
|
|
8
|
-
* This token is used to authenticate API calls to the ATXP server for payment operations.
|
|
9
|
-
* Must be set when using this class, otherwise an error will be thrown.
|
|
10
|
-
*
|
|
11
6
|
* @example
|
|
12
7
|
* ```typescript
|
|
13
|
-
* // Ensure ATXP_AUTH_CLIENT_TOKEN is set in your environment
|
|
14
8
|
* const paymentServer = new ATXPPaymentServer(
|
|
15
9
|
* 'https://auth.atxp.ai',
|
|
16
|
-
* oAuthDb,
|
|
17
10
|
* logger
|
|
18
11
|
* );
|
|
19
12
|
* ```
|
|
20
13
|
*/
|
|
21
|
-
|
|
22
|
-
constructor(server,
|
|
14
|
+
class ATXPPaymentServer {
|
|
15
|
+
constructor(server, logger, fetchFn = fetch) {
|
|
23
16
|
this.server = server;
|
|
24
|
-
this.authCredentials = authCredentials;
|
|
25
17
|
this.logger = logger;
|
|
26
18
|
this.fetchFn = fetchFn;
|
|
27
19
|
this.charge = async ({ source, destination, network, currency, amount }) => {
|
|
@@ -57,18 +49,13 @@ export class ATXPPaymentServer {
|
|
|
57
49
|
/**
|
|
58
50
|
* Makes authenticated requests to the ATXP authorization server
|
|
59
51
|
*
|
|
60
|
-
* This method automatically includes the `ATXP_AUTH_CLIENT_TOKEN` from environment variables
|
|
61
|
-
* in the Authorization header for all requests.
|
|
62
|
-
*
|
|
63
52
|
* @param method - HTTP method ('GET' or 'POST')
|
|
64
53
|
* @param path - API endpoint path
|
|
65
54
|
* @param body - Request body (for POST requests)
|
|
66
55
|
* @returns Promise<Response> - The HTTP response from the server
|
|
67
|
-
* @throws {Error} When `ATXP_AUTH_CLIENT_TOKEN` environment variable is not set
|
|
68
56
|
*
|
|
69
57
|
* @example
|
|
70
58
|
* ```typescript
|
|
71
|
-
* // Ensure ATXP_AUTH_CLIENT_TOKEN is set in your environment
|
|
72
59
|
* const response = await paymentServer.makeRequest('POST', '/charge', {
|
|
73
60
|
* source: 'user123',
|
|
74
61
|
* destination: 'merchant456',
|
|
@@ -81,16 +68,14 @@ export class ATXPPaymentServer {
|
|
|
81
68
|
const response = await this.fetchFn(url, {
|
|
82
69
|
method,
|
|
83
70
|
headers: {
|
|
84
|
-
'Authorization': `Bearer ${this.authCredentials}`,
|
|
85
71
|
'Content-Type': 'application/json'
|
|
86
72
|
},
|
|
87
73
|
body: JSON.stringify(body)
|
|
88
74
|
});
|
|
89
75
|
return response;
|
|
90
76
|
};
|
|
91
|
-
if (!authCredentials || authCredentials.trim() === '') {
|
|
92
|
-
throw new Error('Auth credentials are required');
|
|
93
|
-
}
|
|
94
77
|
}
|
|
95
78
|
}
|
|
96
|
-
|
|
79
|
+
|
|
80
|
+
export { ATXPPaymentServer };
|
|
81
|
+
//# sourceMappingURL=paymentServer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paymentServer.js","
|
|
1
|
+
{"version":3,"file":"paymentServer.js","sources":["../src/paymentServer.ts"],"sourcesContent":[null],"names":[],"mappings":"AAIA;;;;;;;;;;;;AAYG;MACU,iBAAiB,CAAA;AAC5B,IAAA,WAAA,CACmB,MAA8B,EAC9B,MAAc,EACd,UAAqB,KAAK,EAAA;QAF1B,IAAA,CAAA,MAAM,GAAN,MAAM;QACN,IAAA,CAAA,MAAM,GAAN,MAAM;QACN,IAAA,CAAA,OAAO,GAAP,OAAO;AAG1B,QAAA,IAAA,CAAA,MAAM,GAAG,OAAM,EAAC,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EACkC,KAA6B;AAC3H,YAAA,MAAM,IAAI,GAAG,EAAC,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAC;AAC7D,YAAA,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,CAAC;AACtE,YAAA,MAAM,IAAI,GAAG,MAAM,cAAc,CAAC,IAAI,EAA+B;AACrE,YAAA,IAAI,cAAc,CAAC,MAAM,KAAK,GAAG,EAAE;gBACjC,OAAO,EAAC,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAC;YAC/C;AAAO,iBAAA,IAAI,cAAc,CAAC,MAAM,KAAK,GAAG,EAAE;gBACxC,OAAO,EAAC,OAAO,EAAE,KAAK,EAAE,eAAe,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tG,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC;YACtC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;gBACvC,MAAM;AACN,gBAAA,OAAO,EAAE;AACP,oBAAA,cAAc,EAAE;AACjB,iBAAA;AACD,gBAAA,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI;AAC1B,aAAA,CAAC;AACF,YAAA,OAAO,QAAQ;AACjB,QAAA,CAAC;IA5DD;AA6DD;;;;"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { getResource, getPath } from './getResource.js';
|
|
2
|
+
|
|
3
|
+
function sendProtectedResourceMetadata(res, metadata) {
|
|
3
4
|
if (!metadata) {
|
|
4
5
|
return false;
|
|
5
6
|
}
|
|
@@ -8,7 +9,7 @@ export function sendProtectedResourceMetadata(res, metadata) {
|
|
|
8
9
|
res.end(JSON.stringify(metadata));
|
|
9
10
|
return true;
|
|
10
11
|
}
|
|
11
|
-
|
|
12
|
+
function getProtectedResourceMetadata(config, requestUrl) {
|
|
12
13
|
if (isProtectedResourceMetadataRequest(config, requestUrl)) {
|
|
13
14
|
const resource = getResource(config, requestUrl);
|
|
14
15
|
return {
|
|
@@ -37,4 +38,6 @@ function isProtectedResourceMetadataRequest(config, requestUrl) {
|
|
|
37
38
|
}
|
|
38
39
|
return false;
|
|
39
40
|
}
|
|
40
|
-
|
|
41
|
+
|
|
42
|
+
export { getProtectedResourceMetadata, sendProtectedResourceMetadata };
|
|
43
|
+
//# sourceMappingURL=protectedResourceMetadata.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protectedResourceMetadata.js","
|
|
1
|
+
{"version":3,"file":"protectedResourceMetadata.js","sources":["../src/protectedResourceMetadata.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAIM,SAAU,6BAA6B,CAAC,GAAmB,EAAE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AA,IAAI,YAAY,KAAK,CAAA,EAAG,SAAS,CAAA,QAAA,CAAU,EAAE;AAC3C,QAAA,OAAO,IAAI;IACb;AACA,IAAA,OAAO,KAAK;AACd;;;;"}
|
package/dist/requirePayment.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { paymentRequiredError } from
|
|
2
|
-
import { getATXPConfig, atxpAccountId } from
|
|
3
|
-
|
|
1
|
+
import { paymentRequiredError } from '@atxp/common';
|
|
2
|
+
import { getATXPConfig, atxpAccountId } from './atxpContext.js';
|
|
3
|
+
|
|
4
|
+
async function requirePayment(paymentConfig) {
|
|
4
5
|
const config = getATXPConfig();
|
|
5
6
|
if (!config) {
|
|
6
7
|
throw new Error('No config found');
|
|
@@ -33,4 +34,6 @@ export async function requirePayment(paymentConfig) {
|
|
|
33
34
|
config.logger.info(`Created payment request ${paymentId}`);
|
|
34
35
|
throw paymentRequiredError(config.server, paymentId, charge.amount);
|
|
35
36
|
}
|
|
36
|
-
|
|
37
|
+
|
|
38
|
+
export { requirePayment };
|
|
39
|
+
//# sourceMappingURL=requirePayment.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requirePayment.js","
|
|
1
|
+
{"version":3,"file":"requirePayment.js","sources":["../src/requirePayment.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAGO,eAAe,cAAc,CAAC,aAAmC,EAAA;AACtE,IAAA,MAAM,MAAM,GAAG,aAAa,EAAE;IAC9B,IAAI,CAAC,MAAM,EAAE;AACX,QAAA,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC;IACpC;AACA,IAAA,MAAM,IAAI,GAAG,aAAa,EAAE;IAC5B,IAAI,CAAC,IAAI,EAAE;AACT,QAAA,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,eAAe,CAAC;AACpC,QAAA,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC;IAClC;AAEA,IAAA,MAAM,MAAM,GAAG;QACb,MAAM,EAAE,aAAa,CA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|
1
|
+
var TokenProblem;
|
|
2
2
|
(function (TokenProblem) {
|
|
3
3
|
TokenProblem["NO_TOKEN"] = "NO-TOKEN";
|
|
4
4
|
TokenProblem["NON_BEARER_AUTH_HEADER"] = "NON-BEARER-AUTH-HEADER";
|
|
@@ -7,4 +7,6 @@ export var TokenProblem;
|
|
|
7
7
|
TokenProblem["NON_SUFFICIENT_FUNDS"] = "NON-SUFFICIENT-FUNDS";
|
|
8
8
|
TokenProblem["INTROSPECT_ERROR"] = "INTROSPECT-ERROR";
|
|
9
9
|
})(TokenProblem || (TokenProblem = {}));
|
|
10
|
-
|
|
10
|
+
|
|
11
|
+
export { TokenProblem };
|
|
12
|
+
//# sourceMappingURL=types.js.map
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","
|
|
1
|
+
{"version":3,"file":"types.js","sources":["../src/types.ts"],"sourcesContent":[null],"names":[],"mappings":"IAmDY;AAAZ,CAAA,UAAY,YAAY,EAAA;AACtB,IAAA,YAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACrB,IAAA,YAAA,CAAA,wBAAA,CAAA,GAAA,wBAAiD;AACjD,IAAA,YAAA,CAAA,eAAA,CAAA,GAAA,eAA+B;AAC/B,IAAA,YAAA,CAAA,kBAAA,CAAA,GAAA,kBAAqC;AACrC,IAAA,YAAA,CAAA,sBAAA,CAAA,GAAA,sBAA6C;AAC7C,IAAA,YAAA,CAAA,kBAAA,CAAA,GAAA,kBAAqC;AACvC,CAAC,EAPW,YAAY,KAAZ,YAAY,GAAA,EAAA,CAAA,CAAA;;;;"}
|