summaryrefslogtreecommitdiff
path: root/lib/chessh/auth/password.ex
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chessh/auth/password.ex')
-rw-r--r--lib/chessh/auth/password.ex7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/chessh/auth/password.ex b/lib/chessh/auth/password.ex
index 8a6c683..ea2c8fc 100644
--- a/lib/chessh/auth/password.ex
+++ b/lib/chessh/auth/password.ex
@@ -1,10 +1,9 @@
defmodule Chessh.Auth.PasswordAuthenticator do
- alias Chessh.Player
- alias Chessh.Repo
+ alias Chessh.{Player, Repo}
def authenticate(username, password) do
- case Repo.get_by(Player, username: String.Chars.to_string(username)) do
- x -> Player.valid_password?(x, String.Chars.to_string(password))
+ case Repo.get_by(Player, username: username) do
+ x -> Player.valid_password?(x, password)
end
end
end