I am trying to understand if #curl has support for authorization with #mqtt , but I fail to do so.
I just found an old thread from 2022 about it,
I am trying to understand if #curl has support for authorization with #mqtt , but I fail to do so.
I just found an old thread from 2022 about it,
@selea I used the TBMQ MQTT Broker.
I think it could be done by first sending an authentication request using CURL (if memory serves right it's a JSON object sent to `/api/auth/login`), which will return an access token.
Then you just pass the access token in the `X-Authorization` header and it should work?
Might differ based on what your MQTT setup is(?).
https://curl.se/mail/lib-2021-05/0042.html
Maybe using the env variables should work?
@selea it does... It should probably be made clearer in some docs somewhere!
I found this:
https://curl.se/mail/lib-2021-05/0042.html
I guess it is the CURLOPT_USERNAME and CURLOPT_PASSWORD variables that needs to be populated?
Det hade han ;)
076萌SNS is a social network, courtesy of 076. It runs on GNU social, version 2.0.2-beta0, available under the GNU Affero General Public License.
All 076萌SNS content and data are available under the Creative Commons Attribution 3.0 license.