Documentation ¶
Overview ¶
Package mqttclientauth implements authentication for MQTT clients.
Index ¶
- Constants
- type Auth
- type MQTTClientAuth
- func (a *MQTTClientAuth) Close()
- func (a *MQTTClientAuth) Handle(ctx *context.Context) string
- func (a *MQTTClientAuth) Inherit(previousGeneration filters.Filter)
- func (a *MQTTClientAuth) Init()
- func (a *MQTTClientAuth) Kind() *filters.Kind
- func (a *MQTTClientAuth) Name() string
- func (a *MQTTClientAuth) Spec() filters.Spec
- func (a *MQTTClientAuth) Status() interface{}
- type Spec
Constants ¶
View Source
const (
// Kind is the kind of MQTTClientAuth
Kind = "MQTTClientAuth"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auth ¶
type Auth struct { Username string `json:"username" jsonschema:"required"` SaltedSha256Pass string `json:"saltedSha256Pass" jsonschema:"required"` }
Auth describes username and password for MQTTProxy
type MQTTClientAuth ¶
type MQTTClientAuth struct {
// contains filtered or unexported fields
}
MQTTClientAuth is used to check authentication for MQTT client
func (*MQTTClientAuth) Handle ¶
func (a *MQTTClientAuth) Handle(ctx *context.Context) string
Handle handles context.
func (*MQTTClientAuth) Inherit ¶
func (a *MQTTClientAuth) Inherit(previousGeneration filters.Filter)
Inherit init MQTTClientAuth based on previous generation
func (*MQTTClientAuth) Kind ¶
func (a *MQTTClientAuth) Kind() *filters.Kind
Kind return kind of MQTTClientAuth
func (*MQTTClientAuth) Name ¶
func (a *MQTTClientAuth) Name() string
Name returns the name of the MQTTClientAuth filter instance.
func (*MQTTClientAuth) Spec ¶
func (a *MQTTClientAuth) Spec() filters.Spec
Spec returns the spec used by the MQTTClientAuth
func (*MQTTClientAuth) Status ¶
func (a *MQTTClientAuth) Status() interface{}
Status return status of MQTTClientAuth
type Spec ¶
type Spec struct { filters.BaseSpec `json:",inline"` Salt string `json:"salt,omitempty"` Auth []*Auth `json:"auth" jsonschema:"required"` }
Spec is spec for MQTTClientAuth. For security of password, passwords in json file should be salted SHA256 checksum. password = sha256sum(connect.password + salt)
Click to show internal directories.
Click to hide internal directories.