Merge pull request #319 from phanimahesh/patch-1
Add init callback to emqttd_auth_mod, fix #318
This commit is contained in:
commit
af547dc2ae
|
@ -36,6 +36,8 @@
|
||||||
|
|
||||||
-ifdef(use_specs).
|
-ifdef(use_specs).
|
||||||
|
|
||||||
|
-callback init(AuthOpts :: list()) -> {ok, State :: any()}.
|
||||||
|
|
||||||
-callback check(Client, Password, State) -> ok | ignore | {error, string()} when
|
-callback check(Client, Password, State) -> ok | ignore | {error, string()} when
|
||||||
Client :: mqtt_client(),
|
Client :: mqtt_client(),
|
||||||
Password :: binary(),
|
Password :: binary(),
|
||||||
|
@ -48,7 +50,7 @@
|
||||||
-export([behaviour_info/1]).
|
-export([behaviour_info/1]).
|
||||||
|
|
||||||
behaviour_info(callbacks) ->
|
behaviour_info(callbacks) ->
|
||||||
[{check, 3}, {description, 0}];
|
[{init, 1}, {check, 3}, {description, 0}];
|
||||||
behaviour_info(_Other) ->
|
behaviour_info(_Other) ->
|
||||||
undefined.
|
undefined.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue