Unable to authenticate the client connection using on_client_authenticate from plugin_template #12966
Unanswered
venkatac-ayla
asked this question in
Q&A
Replies: 1 comment 4 replies
-
Hello, From the information provided, it looks like the incorrect return value originates in As a side note, this authN hook looks like a generic HTTP authentication plugin. Can builtin auth plugin do the same job? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We have a custom auth plugin created using plugin_template and it was working fine with emqx version 4.0.7. Here is the code
We have updated the code to run on EMQX 5.6.0 and here is the code and after that we always get badmatch error
The issue its reporting is with this line - {ok, 200, Body} -> ets:insert(test_dsns, [{Dsn, Body}]), ok;
At the end instead of ok tried returning {ok, true}/ {ok,ok}/{ok, Body}/success. For everything it says bad match. Here is the stack trace.
The test_http:request method returns {0k, 200, Body} on success.
Any thoughts on what should be returned once it evaluates {0k, 200, Body} in case statement. Am I missing something here?
Beta Was this translation helpful? Give feedback.
All reactions