({ request, requestId, providerConfig })
| 124 | */ |
| 125 | const 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. */ |
nothing calls this directly
no test coverage detected