@sassoftware/sas-score-mcp-serverjs 1.1.3 → 1.1.4
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 +1 -1
- package/src/processHeaders.js +3 -2
package/package.json
CHANGED
package/src/processHeaders.js
CHANGED
|
@@ -31,7 +31,7 @@ function processHeaders(req, res, next, cache, appContext) {
|
|
|
31
31
|
//for now, ignore Authorization if authflow is not bearer
|
|
32
32
|
let token = (hdr != null) ? hdr.slice(7) : null;
|
|
33
33
|
debugger;
|
|
34
|
-
console.error('[Note} AUTHFLOW=',
|
|
34
|
+
console.error('[Note} AUTHFLOW=',appContext.AUTHFLOW);
|
|
35
35
|
console.error("[Note] External authorization :", appContext.AUTHEXTERNAL);
|
|
36
36
|
if (appContext.AUTHFLOW === 'bearer') {
|
|
37
37
|
debugger;
|
|
@@ -42,6 +42,7 @@ function processHeaders(req, res, next, cache, appContext) {
|
|
|
42
42
|
if (token != null) {
|
|
43
43
|
console.error("[Note] Using user supplied token for authorization");
|
|
44
44
|
headerCache.bearerToken = token;
|
|
45
|
+
console.error("[Note] incoming token:", token);
|
|
45
46
|
} else {
|
|
46
47
|
console.error("[Note] No Authorization token provided in header for external authorization.");
|
|
47
48
|
console.error("[Note] Returning 404 since we are configured for external token and no token provided in header.");
|
|
@@ -83,7 +84,7 @@ function processHeaders(req, res, next, cache, appContext) {
|
|
|
83
84
|
// start auth flow process since no token provided in header and we are not configured for external token
|
|
84
85
|
}
|
|
85
86
|
}
|
|
86
|
-
|
|
87
|
+
console.error("Header cache after processing:", headerCache);
|
|
87
88
|
cache.set("headerCache", headerCache);
|
|
88
89
|
next();
|
|
89
90
|
}
|