Skip to content

Commit

Permalink
Fix auth_method not being provided to the extended auth plugin event.
Browse files Browse the repository at this point in the history
Closes #1975. Thanks to Jinming Chen.
  • Loading branch information
ralight committed Dec 23, 2020
1 parent faeb9e9 commit 9d3732a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions ChangeLog.txt
@@ -1,3 +1,8 @@
Broker:
- Fix `auth_method` not being provided to the extended auth plugin event.
Closes #1975.


2.0.4 - 2020-12-22
==================

Expand Down
3 changes: 2 additions & 1 deletion include/mosquitto_broker.h
Expand Up @@ -117,7 +117,8 @@ struct mosquitto_evt_extended_auth {
void *data_out;
uint16_t data_in_len;
uint16_t data_out_len;
void *future2[4];
const char *auth_method;
void *future2[3];
};

/* Data for the MOSQ_EVT_CONTROL event */
Expand Down
1 change: 1 addition & 0 deletions src/security.c
Expand Up @@ -936,6 +936,7 @@ int mosquitto_security_auth_start(struct mosquitto *context, bool reauth, const
DL_FOREACH(opts->plugin_callbacks.ext_auth_start, cb_base){
memset(&event_data, 0, sizeof(event_data));
event_data.client = context;
event_data.auth_method = context->auth_method;
event_data.data_in = data_in;
event_data.data_out = NULL;
event_data.data_in_len = data_in_len;
Expand Down

0 comments on commit 9d3732a

Please sign in to comment.