MCPcopy Index your code
hub / github.com/simstudioai/sim / tokenCacheKey

Function tokenCacheKey

apps/sim/app/api/tools/sap_s4hana/proxy/route.ts:45–50  ·  view source on GitHub ↗
(req: ProxyRequest)

Source from the content-addressed store, hash-verified

43}
44
45function tokenCacheKey(req: ProxyRequest): string {
46 const secretHash = req.clientSecret
47 ? createHash('sha256').update(req.clientSecret).digest('hex').slice(0, 16)
48 : ''
49 return `${resolveTokenUrl(req)}::${req.clientId ?? ''}::${secretHash}`
50}
51
52function rememberToken(key: string, token: CachedToken): void {
53 if (TOKEN_CACHE.has(key)) TOKEN_CACHE.delete(key)

Callers 1

fetchAccessTokenFunction · 0.70

Calls 1

resolveTokenUrlFunction · 0.85

Tested by

no test coverage detected