Environment
- the latest docker image from https://github.com/vernemq/docker-vernemq
- .net core application in the same docker
- webhooks are configured in vernemq.conf and vernemq can send requests to .net core application
Expected behaviour
- vernemq handles response of on_auth_m5 webhook
Actual behaviour
- Hello all,
I am trying to understand if vernemq suits us, but I have faced with an issue which I could not solve.
According to the documentation for web_hooks the proper response for on_auth_m5 is
{
"modifiers":{
"properties":{
"p_authentication_data":"QVVUSF9EQVRBMQ==",
"p_authentication_method":"AUTH_METHOD"
},
"reason_code":0
},
"result":"ok"
}
But looks it's not a proper structure of response according to the logs of vernemq container
{p_authentication_data => <<"AUTH_DATA1">>,p_authentication_method => <<"AUTH_METHOD">>},reason_code => 0}} in vmq_mqtt5_fsm:check_enhanced_auth/2 line 789
13:51:25.837 [error] Ranch listener {{172,17,0,2},1883} terminated with reason: no case clause matching {ok,#{properties => #{p_authentication_data => <<"AUTH_DATA1">>,p_authentication_method => <<"AUTH_METHOD">>},reason_code => 0}} in vmq_mqtt5_fsm:check_enhanced_auth/2 line 789
Then I've changed the structure of response to
{
"properties":{
"p_authentication_data":"QVVUSF9EQVRBMQ==",
"p_authentication_method":"AUTH_METHOD",
"reason_code":0
},
"ok":"ok"
}
After this I checked logs of vernemq container:
13:56:47.871 [error] CRASH REPORT Process <0.2290.0> with 0 neighbours crashed with reason: no case clause matching undefined in vmq_webhooks_plugin:handle_response/3 line 735
13:56:47.872 [error] Ranch listener {{172,17,0,2},1883} terminated with reason: no case clause matching undefined in vmq_webhooks_plugin:handle_response/3 line 735
What is the proper response for on_auth_m5?
Environment
Expected behaviour
Actual behaviour
I am trying to understand if vernemq suits us, but I have faced with an issue which I could not solve.
According to the documentation for web_hooks the proper response for on_auth_m5 is
But looks it's not a proper structure of response according to the logs of vernemq container
{p_authentication_data => <<"AUTH_DATA1">>,p_authentication_method => <<"AUTH_METHOD">>},reason_code => 0}} in vmq_mqtt5_fsm:check_enhanced_auth/2 line 789
13:51:25.837 [error] Ranch listener {{172,17,0,2},1883} terminated with reason: no case clause matching {ok,#{properties => #{p_authentication_data => <<"AUTH_DATA1">>,p_authentication_method => <<"AUTH_METHOD">>},reason_code => 0}} in vmq_mqtt5_fsm:check_enhanced_auth/2 line 789
Then I've changed the structure of response to
After this I checked logs of vernemq container:
13:56:47.871 [error] CRASH REPORT Process <0.2290.0> with 0 neighbours crashed with reason: no case clause matching undefined in vmq_webhooks_plugin:handle_response/3 line 735
13:56:47.872 [error] Ranch listener {{172,17,0,2},1883} terminated with reason: no case clause matching undefined in vmq_webhooks_plugin:handle_response/3 line 735
What is the proper response for on_auth_m5?