MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / basicAuth

Function basicAuth

packages/plugins/apps/src/git-client/transport.ts:16–18  ·  view source on GitHub ↗
(user: string, token: string)

Source from the content-addressed store, hash-verified

14// bitbucket.org: Basic base64("x-token-auth:" + TOKEN) (app password: user:app_password)
15// generic Gitea: Basic base64(username + ":" + TOKEN)
16export function basicAuth(user: string, token: string): string {
17 return "Basic " + btoa(`${user}:${token}`);
18}
19
20export function authForHost(host: string, token?: string): AuthRecipe {
21 if (!token) return {};

Callers 1

authForHostFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected