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 ¶
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.