Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Allow ¶
type Allow struct{}
Allow is an auth controller which allows access to all connections and topics.
func (*Allow) ACL ¶
ACL returns true if a user has access permissions to read or write on a topic. Allow always returns true.
func (*Allow) Authenticate ¶
Auth returns true if a username and password are acceptable. Allow always returns true.
type Controller ¶
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
}
Controller is an interface for authentication controllers.
type Disallow ¶
type Disallow struct{}
Disallow is an auth controller which disallows access to all connections and topics.
func (*Disallow) ACL ¶
ACL returns true if a user has access permissions to read or write on a topic. Disallow always returns false.
func (*Disallow) Authenticate ¶
Auth returns true if a username and password are acceptable. Disallow always returns false.
Click to show internal directories.
Click to hide internal directories.