mqttclientauth

package
v2.7.3 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package mqttclientauth implements authentication for MQTT clients.

Index

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) Close

func (a *MQTTClientAuth) Close()

Close close MQTTClientAuth

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) Init

func (a *MQTTClientAuth) Init()

Init init MQTTClientAuth

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)

Jump to

Keyboard shortcuts

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