Documentation ¶
Index ¶
Constants ¶
View Source
const VendorTokenSeparator = ":"
Variables ¶
This section is empty.
Functions ¶
func ExtractVendorToken ¶
func MetricLogSkipper ¶
func MetricLogSkipper(ctx *fiber.Ctx) bool
MetricLogSkipper check if route is equal "metric" disable log.
Types ¶
type ACLRequest ¶
type ACLRequest struct { Access acl.AccessType `form:"access"` Token string `form:"token"` Username string `from:"username"` Password string `form:"password"` Topic string `form:"topic"` }
AclRequest is the body payload structure of the ACL endpoint.
type ACLResponse ¶
type ACLResponse struct {
Result string `json:"result,omitempty"`
}
type ACLv2Request ¶
type ACLv2Request struct { Token string `json:"token"` Username string `json:"username"` Password string `json:"password"` Topic string `json:"topic"` Action string `json:"action"` }
ACLv2Request is the body payload structure of the ACL endpoint.
type API ¶
type API struct { Authenticators map[string]authenticator.Authenticator DefaultVendor string Tracer trace.Tracer Logger *zap.Logger }
func (API) ACLv2 ¶
ACLv2 is the handler responsible for ACL requests coming from EMQv5. https://www.emqx.io/docs/en/latest/access-control/authz/http.html nolint: wrapcheck, funlen
func (API) Authenticator ¶
func (a API) Authenticator(vendor string) authenticator.Authenticator
func (API) Authv2 ¶
Auth is the handler responsible for authentication. Endpoint will be used by EMQ version 5 which supports JSON on both request and response. https://www.emqx.io/docs/en/latest/access-control/authn/http.html nolint: wrapcheck, funlen
type AuthRequest ¶
type AuthRequest struct { Token string `form:"token" json:"token,omitempty"` Username string `from:"username" json:"username,omitempty"` Password string `form:"password" json:"password,omitempty"` }
AuthRequest is the body payload structure of the auth endpoint.
type AuthResponse ¶
Click to show internal directories.
Click to hide internal directories.