MCPcopy Index your code
hub / github.com/simstudioai/sim / verifyAuth

Function verifyAuth

apps/sim/lib/webhooks/providers/registry.ts:126–135  ·  view source on GitHub ↗
({ request, requestId, providerConfig })

Source from the content-addressed store, hash-verified

124 */
125const defaultHandler: WebhookProviderHandler = {
126 verifyAuth({ request, requestId, providerConfig }) {
127 const token = providerConfig.token
128 if (typeof token === 'string') {
129 if (!verifyTokenAuth(request, token)) {
130 logger.warn(`[${requestId}] Unauthorized webhook access attempt - invalid token`)
131 return new NextResponse('Unauthorized', { status: 401 })
132 }
133 }
134 return null
135 },
136}
137
138/** Look up the provider handler, falling back to the default bearer token handler. */

Callers

nothing calls this directly

Calls 2

verifyTokenAuthFunction · 0.90
warnMethod · 0.65

Tested by

no test coverage detected