MCPcopy
hub / github.com/npmx-dev/npmx.dev / validateToken

Function validateToken

cli/src/server.ts:111–115  ·  view source on GitHub ↗
(authHeader: string | null)

Source from the content-addressed store, hash-verified

109 })
110
111 function validateToken(authHeader: string | null): boolean {
112 if (!authHeader) return false
113 const token = authHeader.replace('Bearer ', '')
114 return token === expectedToken
115 }
116
117 app.post('/connect', async (event: H3Event) => {
118 const rawBody = await event.req.json()

Callers 1

createConnectorAppFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected