MCPcopy Create free account
hub / github.com/massCodeIO/massCode / interpolateAuth

Function interpolateAuth

src/main/ipc/handlers/http.ts:38–57  ·  view source on GitHub ↗
(
  auth: HttpAuth,
  variables: Record<string, string>,
)

Source from the content-addressed store, hash-verified

36}
37
38function interpolateAuth(
39 auth: HttpAuth,
40 variables: Record<string, string>,
41): HttpAuth {
42 return {
43 type: auth.type,
44 token:
45 auth.token !== undefined
46 ? interpolate(auth.token, variables)
47 : auth.token,
48 username:
49 auth.username !== undefined
50 ? interpolate(auth.username, variables)
51 : auth.username,
52 password:
53 auth.password !== undefined
54 ? interpolate(auth.password, variables)
55 : auth.password,
56 }
57}
58
59function interpolateRequest(
60 request: HttpExecuteRequest,

Callers 1

interpolateRequestFunction · 0.70

Calls 1

interpolateFunction · 0.85

Tested by

no test coverage detected