Hey there,
The following incorrect vmq_webhooks.conf will be processed by vmq_webhook plugin but not by vernemq it self.
{hooks,1, [ {"http://localhost/api/auth/register", auth_on_register, [{base64_payload, true}]}, {"http://localhost/api/auth/subscribe", auth_on_subscribe, [{base64_payload, true}]}, {"http://localhost/api/auth/publish", publish, [{base64_payload, true}]} ]}.
The webhook "publish" doesn't exist. However the vmq-admin webhooks status shows
`+-----------------+-----------------------------------+-------------+
| hook | endpoint |base64payload|
+-----------------+-----------------------------------+-------------+
|auth_on_subscribe|http://localhost/api/auth/subscribe| true |
|auth_on_register |http://localhost/api/auth/register | true |
| auth_on_publish | http://localhost/api/auth/publish | true |
+-----------------+-----------------------------------+-------------+`
But publish webhook won't get into the vmq_plugin.conf.
{plugins,[{application,vmq_passwd,[]}, {application,vmq_acl,[]}, {module,vmq_config,[{hooks,[{change_config,change_config,1}]}]}, {module,vmq_lvldb_store, [{hooks,[{msg_store_write,msg_store_write,2}]}]}, {module,vmq_lvldb_store, [{hooks,[{msg_store_delete,msg_store_delete,2}]}]}, {module,vmq_lvldb_store, [{hooks,[{msg_store_find,msg_store_find,1}]}]}, {module,vmq_lvldb_store, [{hooks,[{msg_store_read,msg_store_read,2}]}]}, {application,vmq_webhooks, [{paths,["/app/broker/plugins/vmq_webhooks/_build/default/"]}]}, {module,vmq_webhooks_plugin, [{hooks,[{auth_on_register,auth_on_register,5}]}]}, {module,vmq_webhooks_plugin, [{hooks,[{auth_on_subscribe,auth_on_subscribe,3}]}]}]}.
I think there's some additional validation inside of the vmq_webhooks plugin necessary.
Best,
Michael