You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be really handy if this plugin could populate the Authorization header with Bearer $token in the HTTP requests that are sent to a configured webhook.
In my scenario, I'm hosting the webhooks as Lambda functions behind AWS API Gateway, and API Gateway's custom authorizers don't support reading from the request's POST body. If this plugin sent the token in the request's Authorization header, I'd be able to create a custom authorizer that could validate the provided function, and decouple my authentication logic from each individual function that sits behind API Gateway.
I'm not too familiar with PHP or Moodle plugin development, but if it's as simple as modifying lib.php's local_webhooks_send_request() function to set the header, I'm happy to open a PR.
The text was updated successfully, but these errors were encountered:
It would be really handy if this plugin could populate the
Authorization
header withBearer $token
in the HTTP requests that are sent to a configured webhook.In my scenario, I'm hosting the webhooks as Lambda functions behind AWS API Gateway, and API Gateway's custom authorizers don't support reading from the request's POST body. If this plugin sent the token in the request's
Authorization
header, I'd be able to create a custom authorizer that could validate the provided function, and decouple my authentication logic from each individual function that sits behind API Gateway.I'm not too familiar with PHP or Moodle plugin development, but if it's as simple as modifying
lib.php
'slocal_webhooks_send_request()
function to set the header, I'm happy to open a PR.The text was updated successfully, but these errors were encountered: