MCPcopy Create free account
hub / github.com/zenstackhq/zenstack / rejectAuth

Function rejectAuth

packages/cli/src/actions/proxy.ts:50–52  ·  view source on GitHub ↗
(res: express.Response, code: ProxyAuthErrorCode)

Source from the content-addressed store, hash-verified

48type ProxyAuthErrorCode = keyof typeof ProxyAuthError;
49
50function rejectAuth(res: express.Response, code: ProxyAuthErrorCode) {
51 return res.status(401).json({ code, message: ProxyAuthError[code] });
52}
53/**
54 * Represents the identity claim embedded in the Authorization header.
55 * The bearer token is a plain base64-encoded JSON string.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected