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

Function bearerToken

apps/host-selfhost/src/auth/identity.ts:23–29  ·  view source on GitHub ↗
(headers: Headers)

Source from the content-addressed store, hash-verified

21// ---------------------------------------------------------------------------
22
23const bearerToken = (headers: Headers): string | undefined => {
24 const authorization = headers.get("authorization");
25 if (!authorization) return undefined;
26 return authorization.toLowerCase().startsWith("bearer ")
27 ? authorization.slice(7).trim() || undefined
28 : undefined;
29};
30
31/**
32 * Resolve workspace-write authority from the caller's current membership in

Callers 1

identity.tsFile · 0.70

Calls 1

getMethod · 0.65

Tested by

no test coverage detected