@scrypted/server 0.92.0 → 0.93.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.
@@ -216,13 +216,6 @@ async function start(mainFilename, options) {
|
|
216
216
|
}
|
217
217
|
};
|
218
218
|
app.use(async (req, res, next) => {
|
219
|
-
const defaultAuthentication = getDefaultAuthentication(req);
|
220
|
-
if (defaultAuthentication) {
|
221
|
-
res.locals.username = defaultAuthentication._id;
|
222
|
-
res.locals.aclId = defaultAuthentication.aclId;
|
223
|
-
next();
|
224
|
-
return;
|
225
|
-
}
|
226
219
|
// the remote address may be ipv6 prefixed so use a fuzzy match.
|
227
220
|
// eg ::ffff:192.168.2.124
|
228
221
|
if (process_1.default.env.SCRYPTED_ADMIN_USERNAME
|
@@ -293,6 +286,13 @@ async function start(mainFilename, options) {
|
|
293
286
|
else if (req.query['scryptedToken']) {
|
294
287
|
checkToken(req.query.scryptedToken.toString());
|
295
288
|
}
|
289
|
+
if (!res.locals.username) {
|
290
|
+
const defaultAuthentication = getDefaultAuthentication(req);
|
291
|
+
if (defaultAuthentication) {
|
292
|
+
res.locals.username = defaultAuthentication._id;
|
293
|
+
res.locals.aclId = defaultAuthentication.aclId;
|
294
|
+
}
|
295
|
+
}
|
296
296
|
next();
|
297
297
|
});
|
298
298
|
// allow basic auth to deploy plugins
|
@@ -577,21 +577,6 @@ async function start(mainFilename, options) {
|
|
577
577
|
});
|
578
578
|
return;
|
579
579
|
}
|
580
|
-
// env based anon user login
|
581
|
-
const defaultAuthentication = getDefaultAuthentication(req);
|
582
|
-
if (defaultAuthentication) {
|
583
|
-
const userToken = new usertoken_1.UserToken(defaultAuthentication._id, defaultAuthentication.aclId, Date.now());
|
584
|
-
res.send({
|
585
|
-
...createTokens(userToken),
|
586
|
-
expiration: usertoken_1.ONE_DAY_MILLISECONDS,
|
587
|
-
username: defaultAuthentication,
|
588
|
-
// TODO: do not return the token from a short term auth mechanism?
|
589
|
-
token: defaultAuthentication?.token,
|
590
|
-
...alternateAddresses,
|
591
|
-
hostname,
|
592
|
-
});
|
593
|
-
return;
|
594
|
-
}
|
595
580
|
// basic auth
|
596
581
|
if (req.protocol === 'https' && req.headers.authorization) {
|
597
582
|
const username = await new Promise(resolve => {
|
@@ -630,6 +615,21 @@ async function start(mainFilename, options) {
|
|
630
615
|
});
|
631
616
|
}
|
632
617
|
catch (e) {
|
618
|
+
// env based anon user login
|
619
|
+
const defaultAuthentication = getDefaultAuthentication(req);
|
620
|
+
if (defaultAuthentication) {
|
621
|
+
const userToken = new usertoken_1.UserToken(defaultAuthentication._id, defaultAuthentication.aclId, Date.now());
|
622
|
+
res.send({
|
623
|
+
...createTokens(userToken),
|
624
|
+
expiration: usertoken_1.ONE_DAY_MILLISECONDS,
|
625
|
+
username: defaultAuthentication,
|
626
|
+
// TODO: do not return the token from a short term auth mechanism?
|
627
|
+
token: defaultAuthentication?.token,
|
628
|
+
...alternateAddresses,
|
629
|
+
hostname,
|
630
|
+
});
|
631
|
+
return;
|
632
|
+
}
|
633
633
|
res.send({
|
634
634
|
error: e?.message || 'Unknown Error.',
|
635
635
|
hasLogin,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"scrypted-server-main.js","sourceRoot":"","sources":["../src/scrypted-server-main.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8DAAqC;AACrC,kEAAyC;AACzC,oDAA4B;AAC5B,mCAA8B;AAC9B,sDAA2C;AAC3C,4CAAoB;AACpB,gDAAwB;AACxB,0DAAiC;AACjC,kDAA0B;AAC1B,yCAAoC;AACpC,8CAAsB;AACtB,4CAAoB;AACpB,gDAAwB;AACxB,sDAA8B;AAC9B,oDAA4B;AAC5B,2DAAwE;AACxE,iCAA8F;AAC9F,yCAA4D;AAC5D,oDAA4B;AAC5B,wDAAoD;AACpD,0DAA2D;AAC3D,+BAAuC;AACvC,uCAA4C;AAC5C,uDAAwH;AACxH,8CAAsD;AACtD,4CAAyE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C,oBAAoB,MAAM,QAAQ,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IACpE,OAAO,CAAC,GAAG,CAAC,yDAAyD,CAAC,CAAC;IACvE,OAAO,CAAC,GAAG,CAAC,sCAAsC,EAAE,wCAAsB,CAAC,CAAC;IAC5E,OAAO,CAAC,GAAG,CAAC,kDAAkD,CAAC,CAAA;IAC/D,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAA;IAC3C,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAA;IAC7C,OAAO,CAAC,GAAG,CAAC,oEAAoE,CAAC,CAAA;IACjF,OAAO,CAAC,GAAG,CAAC,wEAAwE,CAAC,CAAC;IACtF,OAAO,CAAC,GAAG,CAAC,0DAA0D,CAAC,CAAC;IACxE,OAAO,CAAC,GAAG,CAAC,+DAA+D,CAAC,CAAA;IAC5E,OAAO,CAAC,GAAG,CAAC,yDAAyD,CAAC,CAAC;IAEvE,OAAO,QAAQ,CAAC;AACpB,CAAC;AAED,kBAAe,KAAK,CAAC"}
|
package/package.json
CHANGED
@@ -220,14 +220,6 @@ async function start(mainFilename: string, options?: {
|
|
220
220
|
}
|
221
221
|
|
222
222
|
app.use(async (req, res, next) => {
|
223
|
-
const defaultAuthentication = getDefaultAuthentication(req);
|
224
|
-
if (defaultAuthentication) {
|
225
|
-
res.locals.username = defaultAuthentication._id;
|
226
|
-
res.locals.aclId = defaultAuthentication.aclId;
|
227
|
-
next();
|
228
|
-
return;
|
229
|
-
}
|
230
|
-
|
231
223
|
// the remote address may be ipv6 prefixed so use a fuzzy match.
|
232
224
|
// eg ::ffff:192.168.2.124
|
233
225
|
if (process.env.SCRYPTED_ADMIN_USERNAME
|
@@ -307,6 +299,15 @@ async function start(mainFilename: string, options?: {
|
|
307
299
|
else if (req.query['scryptedToken']) {
|
308
300
|
checkToken(req.query.scryptedToken.toString());
|
309
301
|
}
|
302
|
+
|
303
|
+
if (!res.locals.username) {
|
304
|
+
const defaultAuthentication = getDefaultAuthentication(req);
|
305
|
+
if (defaultAuthentication) {
|
306
|
+
res.locals.username = defaultAuthentication._id;
|
307
|
+
res.locals.aclId = defaultAuthentication.aclId;
|
308
|
+
}
|
309
|
+
}
|
310
|
+
|
310
311
|
next();
|
311
312
|
});
|
312
313
|
|
@@ -637,22 +638,6 @@ async function start(mainFilename: string, options?: {
|
|
637
638
|
return;
|
638
639
|
}
|
639
640
|
|
640
|
-
// env based anon user login
|
641
|
-
const defaultAuthentication = getDefaultAuthentication(req);
|
642
|
-
if (defaultAuthentication) {
|
643
|
-
const userToken = new UserToken(defaultAuthentication._id, defaultAuthentication.aclId, Date.now());
|
644
|
-
res.send({
|
645
|
-
...createTokens(userToken),
|
646
|
-
expiration: ONE_DAY_MILLISECONDS,
|
647
|
-
username: defaultAuthentication,
|
648
|
-
// TODO: do not return the token from a short term auth mechanism?
|
649
|
-
token: defaultAuthentication?.token,
|
650
|
-
...alternateAddresses,
|
651
|
-
hostname,
|
652
|
-
});
|
653
|
-
return;
|
654
|
-
}
|
655
|
-
|
656
641
|
// basic auth
|
657
642
|
if (req.protocol === 'https' && req.headers.authorization) {
|
658
643
|
const username = await new Promise(resolve => {
|
@@ -697,6 +682,22 @@ async function start(mainFilename: string, options?: {
|
|
697
682
|
})
|
698
683
|
}
|
699
684
|
catch (e) {
|
685
|
+
// env based anon user login
|
686
|
+
const defaultAuthentication = getDefaultAuthentication(req);
|
687
|
+
if (defaultAuthentication) {
|
688
|
+
const userToken = new UserToken(defaultAuthentication._id, defaultAuthentication.aclId, Date.now());
|
689
|
+
res.send({
|
690
|
+
...createTokens(userToken),
|
691
|
+
expiration: ONE_DAY_MILLISECONDS,
|
692
|
+
username: defaultAuthentication,
|
693
|
+
// TODO: do not return the token from a short term auth mechanism?
|
694
|
+
token: defaultAuthentication?.token,
|
695
|
+
...alternateAddresses,
|
696
|
+
hostname,
|
697
|
+
});
|
698
|
+
return;
|
699
|
+
}
|
700
|
+
|
700
701
|
res.send({
|
701
702
|
error: e?.message || 'Unknown Error.',
|
702
703
|
hasLogin,
|