zaikio / zaikio-webhooks Goto Github PK
View Code? Open in Web Editor NEWAllows to register webhook callbacks for different clients in an async way
License: MIT License
Allows to register webhook callbacks for different clients in an async way
License: MIT License
In Mission Control, the ApplicationController
enables authentication using a before_filter
. Zaikio::Webhooks::WebhooksController
, which inherits from MC's ApplicationController
, inherits this filter, effectively preventing webhooks from being delivered.
The webhook engine's Zaikio::Webhooks::WebhooksController
inherits from ApplicationController
, but doesn't define it's own ApplicationController
.
I've worked around the issue by creating a custom controller + route:
# app/controllers/webhooks_controller.rb
class WebhooksController < Zaikio::Webhooks::WebhooksController
skip_before_filter :ensure_authentication, only: %i[receive_event]
end
# config/routes.rb
post "/zaikio/webhook/:client_name", to: "webhooks#receive_event"
I was wondering whether this is the most appropriate solution, or whether it makes sense to include a plain ApplicationController
in the Webhook engine, or to include some other mechanism of un-requiring authentication for the webhooks engine.
Other repos (e.g. zai-procurement
) don't run into this issue because they have a different controller structure:
ApplicationController
(not authed)
Consumers::ApplicationController < ApplicationController
(authed)
Suppliers::ApplicationController < ApplicationController
(authed)
Thoughts?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.