Copyright © 2018-2019 Marc Worrell
This module defines the mqtt_sessions_runtime behaviour.
Required callback functions: vhost_pool/1, pool_default/0, new_user_context/3, connect/4, reauth/2, is_allowed/4, is_valid_message/3, control_message/3.
Authors: Marc Worrell (marc@worrell.nl).
topic() = [binary()]
user_context() = term()
connect/4 | |
control_message/3 | |
is_allowed/4 | |
is_valid_message/3 | Check a message and its options before it is processed. |
new_user_context/3 | |
pool_default/0 | |
reauth/2 | Re-authentication. |
vhost_pool/1 |
connect(Packet::mqtt_packet_map:mqtt_packet(), IsSessionPresent::boolean(), Options::mqtt_session:msg_options(), UserContext::user_context()) -> {ok, mqtt_packet_map:mqtt_packet(), user_context()} | {error, term()}
control_message(Topic::topic(), Packet::mqtt_packet_map:mqtt_packet(), UserContext::user_context()) -> {ok, user_context()}
is_allowed(X1::publish | subscribe, Topic::topic(), Packet::mqtt_packet_map:mqtt_packet(), UserContext::user_context()) -> boolean()
is_valid_message(Msg::mqtt_packet_map:mqtt_packet(), Options::mqtt_sessions:msg_options(), UserContext::user_context()) -> boolean()
Check a message and its options before it is processed. Used for http connections with authentication cookies.
new_user_context(Pool::atom(), ClientId::binary(), Options::mqtt_sessions:session_options()) -> term()
pool_default() -> {ok, atom()} | {error, term()}
reauth(X1::mqtt_packet_map:mqtt_packet(), UserContext::user_context()) -> {ok, mqtt_packet_map:mqtt_packet(), user_context()} | {error, term()}
Re-authentication. This is called when the client requests a re-authentication (or replies in a AUTH re-authentication).
vhost_pool(VHost::binary()) -> {ok, atom()} | {error, term()}
Generated by EDoc