Skip to content

Commit

Permalink
remove redundant beign
Browse files Browse the repository at this point in the history
  • Loading branch information
kickster97 committed Feb 10, 2025
1 parent 00687b3 commit f19fbd2
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/lavinmq/auth/authenticators/basic.cr
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ module LavinMQ
end

def authenticate(username : String, password : String) : User?
begin
user = @users[username]
return user if user && user.password && user.password.not_nil!.verify(password)
rescue ex : Exception
Log.error { "Basic authentication failed: #{ex.message}" }
end
user = @users[username]
return user if user && user.password && user.password.not_nil!.verify(password)
rescue ex : Exception
Log.error { "Basic authentication failed: #{ex.message}" }
end
end
end
Expand Down

0 comments on commit f19fbd2

Please sign in to comment.