@meru2802/aux-server 1.0.0 → 1.0.1
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authMiddleware.d.ts","sourceRoot":"","sources":["../../src/middleware/authMiddleware.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAKlD,qBAAa,cAAe,SAAQ,cAAc;gBACpC,gBAAgB,CAAC,EAAE,iBAAiB;IAIzC,QAAQ,GAAI,KAAK,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"authMiddleware.d.ts","sourceRoot":"","sources":["../../src/middleware/authMiddleware.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAKlD,qBAAa,cAAe,SAAQ,cAAc;gBACpC,gBAAgB,CAAC,EAAE,iBAAiB;IAIzC,QAAQ,GAAI,KAAK,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,YAAY,UA2KhE;IAEK,WAAW,GAChB,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,MAAM,YAAY,KACjB,OAAO,CAAC,IAAI,CAAC,CAgFd;CACH"}
|
|
@@ -62,7 +62,6 @@ class AuthMiddleware extends BaseMiddleware_1.BaseMiddleware {
|
|
|
62
62
|
res.status(401).json(unauthorizedResponse);
|
|
63
63
|
return;
|
|
64
64
|
}
|
|
65
|
-
// Validate timestamp format and convert to number
|
|
66
65
|
let requestTime;
|
|
67
66
|
try {
|
|
68
67
|
requestTime = parseInt(timestamp.toString());
|
|
@@ -127,6 +126,7 @@ class AuthMiddleware extends BaseMiddleware_1.BaseMiddleware {
|
|
|
127
126
|
res.status(401).json(unauthorizedResponse);
|
|
128
127
|
return;
|
|
129
128
|
}
|
|
129
|
+
console.log(`HMAC Body hash: ${bodyHash}`);
|
|
130
130
|
let message;
|
|
131
131
|
try {
|
|
132
132
|
message = [
|
|
@@ -137,6 +137,7 @@ class AuthMiddleware extends BaseMiddleware_1.BaseMiddleware {
|
|
|
137
137
|
`content-type:application/json;host:${req.hostname}`,
|
|
138
138
|
bodyHash,
|
|
139
139
|
].join("\n");
|
|
140
|
+
console.log(`HMAC Message: ${message}`);
|
|
140
141
|
}
|
|
141
142
|
catch (messageError) {
|
|
142
143
|
console.error("Error constructing HMAC message:", messageError);
|