MCPcopy Create free account
hub / github.com/OpenDCAI/OpenPrism / getQueryToken

Function getQueryToken

apps/backend/src/utils/authUtils.js:29–34  ·  view source on GitHub ↗
(req)

Source from the content-addressed store, hash-verified

27}
28
29export function getQueryToken(req) {
30 const token = req.query?.token;
31 if (!token) return null;
32 if (Array.isArray(token)) return token[0];
33 return String(token);
34}
35
36export function requireAuthIfRemote(req) {
37 if (!COLLAB_REQUIRE_TOKEN) return { ok: true, payload: null };

Callers 1

requireAuthIfRemoteFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected