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

Function bearerToken

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

Source from the content-addressed store, hash-verified

41};
42
43const bearerToken = (headers: Headers): string | undefined => {
44 const authorization = headers.get("authorization");
45 if (!authorization) return undefined;
46 return authorization.toLowerCase().startsWith("bearer ")
47 ? authorization.slice(7).trim() || undefined
48 : undefined;
49};
50
51// The OAuth provider callback is hit by the user's external browser, which
52// 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