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

Function bearerToken

packages/core/test-servers/src/worker.ts:66–69  ·  view source on GitHub ↗
(request: Request)

Source from the content-addressed store, hash-verified

64 base64url(await crypto.subtle.digest("SHA-256", new TextEncoder().encode(verifier)));
65
66const bearerToken = (request: Request): string | null => {
67 const header = request.headers.get("authorization");
68 return header?.replace(/^Bearer\s+/i, "") ?? null;
69};
70
71const isAuthorized = (request: Request): boolean => {
72 const token = bearerToken(request);

Callers 1

isAuthorizedFunction · 0.70

Calls 2

getMethod · 0.65
replaceMethod · 0.65

Tested by

no test coverage detected