brokerauth

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package brokerauth glues comqttauth.Hook onto a comqtt server using the same parsed auth Options that the upstream auth hook consumes. It is intended for use from cmd/comqttauth-broker and cmd/comqttauth-broker-cluster to keep their initAuth bodies near-verbatim mirrors of upstream cmd/single and cmd/cluster.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InstallRegexHook

func InstallRegexHook(server *mqtt.Server, authMode, datasource uint, opts any) error

InstallRegexHook attaches comqttauth.Hook to server using the already-parsed upstream auth Options as the source of backend connection details. Must be called AFTER the upstream auth hook is added so the hook chain orders connection-auth → regex-acl.

authMode is config.Auth.Way (1=username, 2=clientid). datasource is config.Auth.Datasource. opts is the *rauth.Options / *mauth.Options / *pauth.Options that was passed to server.AddHook for the upstream hook.

Returns nil and installs nothing for AuthDSFree and AuthDSHttp — comqttauth has no backend for those datasources, so connection auth runs alone and the broker default-allows topics.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL