Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get auth_method in v5 plugin? #1975

Closed
cjmdaixi opened this issue Dec 23, 2020 · 2 comments
Closed

How to get auth_method in v5 plugin? #1975

cjmdaixi opened this issue Dec 23, 2020 · 2 comments

Comments

@cjmdaixi
Copy link

Hi,

I found that v4 plugin has a method called mosquitto_auth_start which has one argument to get the auth_method from Mosquitto context. However, it seems that there is no alternative argument or interface for v5 plugin to get auth_method?

@ralight
Copy link
Contributor

ralight commented Dec 23, 2020

The way you should be able to do this in theory is as follows:

int auth_callback(int event, void *event_data, void *userdata)
{
    struct mosquitto_evt_extended_auth *ed = event_data;

    printf("%s\n", ed->auth_method);
    return 0;
}

Or to use mosquitto_client_auth_method(client), but unfortunately both of those methods have been missed and so don't exist.

I will add auth_method to the struct for 2.0.5, but that won't be until January now.

@cjmdaixi
Copy link
Author

Well, so I have to code an independent v4 plugin to get the auth_method right now.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants