Skip to content

Commit 9c71ee4

Browse files
chore: update import lib path, ignore unused variables (#66)
1 parent 3871ae1 commit 9c71ee4

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

apps/vmq_enhanced_auth/src/vmq_enhanced_auth.erl

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,8 @@
4141

4242
-import(vmq_topic, [words/1, match/2]).
4343

44-
-include("apps/vmq_server/src/vmq_server.hrl").
44+
-include_lib("vmq_server/src/vmq_server.hrl").
4545

46-
-define(INIT_ACL, {[], [], [], [], [], []}).
4746
-define(TABLES, [
4847
vmq_enhanced_auth_acl_read_pattern,
4948
vmq_enhanced_auth_acl_write_pattern,
@@ -159,11 +158,11 @@ auth_on_publish_m5(User, SubscriberId, QoS, Topic, Payload, IsRetain, _Props) ->
159158
auth_on_publish(User, SubscriberId, QoS, Topic, Payload, IsRetain).
160159

161160
auth_on_register(
162-
{_IpAddr, _Port} = Peer,
163-
{_MountPoint, _ClientId} = SubscriberId,
161+
{_IpAddr, _Port} = _Peer,
162+
{_MountPoint, _ClientId} = _SubscriberId,
164163
UserName,
165164
Password,
166-
CleanSession
165+
_CleanSession
167166
) ->
168167
%% do whatever you like with the params, all that matters
169168
%% is the return value of this function
@@ -587,7 +586,7 @@ verify(Password, SecretKey) ->
587586
try jwerl:verify(Password, hs256, SecretKey) of
588587
_ -> jwerl:verify(Password, hs256, SecretKey)
589588
catch
590-
error:Error -> {error, invalid_signature}
589+
error:_Error -> {error, invalid_signature}
591590
end.
592591

593592
check_rid(Claims, UserName) ->

0 commit comments

Comments
 (0)