mosquitto-dynsec

1.0.7 • Public • Published

node-mosquitto-dynsec

This is a NodeJS module for managing eclipse-mosquitto Dynamic Security plugin.

import {MosquittoDynsec} from "mosquitto-dynsec"
const dynsec = new MosquittoDynsec()

try {
  await dynsec.connect({
    hostname: "mqtt.example.com",
    username: "foo",
    password: "bar"
  })
} catch(e) {
  console.error("Connect error:", e)
}

const res = await dynsec.createClient({ username: "user1", password: "pass" })

Implemented commands

The folowing commands specs were imeplmented using the source code of mosquitto_ctlr as reference. (dynsec.c)

listClients

createClient

deleteClient

setClientId

setClientPassword

getClient

addClientRole

removeClientRole

enableClient

disableClient

createRole

deleteRole

getRole

listRoles

addRoleACL

removeRoleACL

createGroup

deleteGroup

listGroups

getGroup

getAnonymousGroup

setAnonymousGroup

addGroupClient

removeGroupClient

addGroupRole

removeGroupRole

getDefaultACLAccess

setDefaultACLAccess

Readme

Keywords

Package Sidebar

Install

npm i mosquitto-dynsec

Weekly Downloads

44

Version

1.0.7

License

MIT

Unpacked Size

10.7 kB

Total Files

5

Last publish

Collaborators

  • cafegratz