Files
mochi-mqtt/internal/auth/auth.go
2019-11-24 22:17:34 +00:00

13 lines
384 B
Go

package auth
// Controller is an interface for authentication controllers.
type Controller interface {
// Authenticate authenticates a user on CONNECT and returns true if a user is
// allowed to join the server.
Authenticate(user, password []byte) bool
// ACL returns true if a user has read or write access to a given topic.
ACL(user []byte, topic string, write bool) bool
}