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

Function bearerToken

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

Source from the content-addressed store, hash-verified

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