MCPcopy Create free account
hub / github.com/codeaashu/claude-code / redactTokens

Function redactTokens

src/services/mcp/xaa.ts:94–97  ·  view source on GitHub ↗
(raw: unknown)

Source from the content-addressed store, hash-verified

92 /"(access_token|refresh_token|id_token|assertion|subject_token|client_secret)"\s*:\s*"[^"]*"/g
93
94function redactTokens(raw: unknown): string {
95 const s = typeof raw === 'string' ? raw : jsonStringify(raw)
96 return s.replace(SENSITIVE_TOKEN_RE, (_, k) => `"${k}":"[REDACTED]"`)
97}
98
99// ─── Zod Schemas ────────────────────────────────────────────────────────────
100

Callers 2

exchangeJwtAuthGrantFunction · 0.85

Calls 1

jsonStringifyFunction · 0.85

Tested by

no test coverage detected