summaryrefslogtreecommitdiff
path: root/lib/chessh/auth/password.ex
diff options
context:
space:
mode:
authorSimponic <loganhunt@simponic.xyz>2022-12-29 17:21:20 -0700
committerSimponic <loganhunt@simponic.xyz>2022-12-29 17:21:20 -0700
commit1a2bdccf124de6207899f59538cc0ed2efc97b5a (patch)
tree5b582023531c8df637881899ab64d5f5eddd7f3f /lib/chessh/auth/password.ex
parent10bc34245e8e1e3ba63fb0720d3bcfb1119db921 (diff)
downloadchessh-1a2bdccf124de6207899f59538cc0ed2efc97b5a.tar.gz
chessh-1a2bdccf124de6207899f59538cc0ed2efc97b5a.zip
Add scalable nodes and user sessions
Diffstat (limited to 'lib/chessh/auth/password.ex')
-rw-r--r--lib/chessh/auth/password.ex4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chessh/auth/password.ex b/lib/chessh/auth/password.ex
index c3b03f5..ea2c8fc 100644
--- a/lib/chessh/auth/password.ex
+++ b/lib/chessh/auth/password.ex
@@ -2,8 +2,8 @@ defmodule Chessh.Auth.PasswordAuthenticator do
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