summaryrefslogtreecommitdiff
path: root/lib/chessh/auth
diff options
context:
space:
mode:
authorLogan Hunt <loganhunt@simponic.xyz>2022-12-29 18:37:51 -0700
committerGitHub <noreply@github.com>2022-12-29 18:37:51 -0700
commitc143bb549c53f2737c41cdfce6cc2598c5489bdc (patch)
tree33853e2a9c30ff7c670aa4ff5b73df005d6e6fec /lib/chessh/auth
parentf7c2ccbe26dc808e4a7eae9a378e6c382220961a (diff)
parent479ca815e3a1760c71e8977674434b15f94ae833 (diff)
downloadchessh-c143bb549c53f2737c41cdfce6cc2598c5489bdc.tar.gz
chessh-c143bb549c53f2737c41cdfce6cc2598c5489bdc.zip
Merge pull request #1 from Simponic/erlang_ssh_server
Diffstat (limited to 'lib/chessh/auth')
-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