|
|
@@ -40,10 +40,19 @@
|
|
|
-type(username() :: maybe(binary())).
|
|
|
-type(password() :: maybe(binary())).
|
|
|
-type(peername() :: {inet:ip_address(), inet:port_number()}).
|
|
|
+-type(auth_result() :: success
|
|
|
+ | client_identifier_not_valid
|
|
|
+ | bad_username_or_password
|
|
|
+ | not_authorized
|
|
|
+ | server_unavailable
|
|
|
+ | server_busy
|
|
|
+ | banned
|
|
|
+ | bad_authentication_method).
|
|
|
-type(protocol() :: mqtt | 'mqtt-sn' | coap | stomp | none | atom()).
|
|
|
-type(credentials() :: #{client_id := client_id(),
|
|
|
username := username(),
|
|
|
peername := peername(),
|
|
|
+ result := auth_result(),
|
|
|
zone => zone(),
|
|
|
atom() => term()
|
|
|
}).
|