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

Function bearerToken

apps/local/src/identity.ts:44–50  ·  view source on GitHub ↗
(headers: Headers)

Source from the content-addressed store, hash-verified

42};
43
44const bearerToken = (headers: Headers): string | undefined => {
45 const authorization = headers.get("authorization");
46 if (!authorization) return undefined;
47 return authorization.toLowerCase().startsWith("bearer ")
48 ? authorization.slice(7).trim() || undefined
49 : undefined;
50};
51
52// The OAuth provider callback is hit by the user's external browser, which
53// can't carry our bearer — the OAuth `state` (validated downstream by

Callers 1

makeLocalIdentityLayerFunction · 0.70

Calls 1

getMethod · 0.65

Tested by

no test coverage detected