Merge pull request #319 from phanimahesh/patch-1

Add init callback to emqttd_auth_mod, fix #318
This commit is contained in:
Feng Lee 2015-09-28 21:45:36 +08:00
commit af547dc2ae
1 changed files with 3 additions and 1 deletions

View File

@ -36,6 +36,8 @@
-ifdef(use_specs).
-callback init(AuthOpts :: list()) -> {ok, State :: any()}.
-callback check(Client, Password, State) -> ok | ignore | {error, string()} when
Client :: mqtt_client(),
Password :: binary(),
@ -48,7 +50,7 @@
-export([behaviour_info/1]).
behaviour_info(callbacks) ->
[{check, 3}, {description, 0}];
[{init, 1}, {check, 3}, {description, 0}];
behaviour_info(_Other) ->
undefined.