summaryrefslogtreecommitdiff
path: root/lib/auth
diff options
context:
space:
mode:
authorSimponic <loganhunt@simponic.xyz>2022-12-19 01:37:10 -0700
committerSimponic <loganhunt@simponic.xyz>2022-12-19 01:39:10 -0700
commit9cdfb6eb9cd30c4e06a7d9fef53e519983827d81 (patch)
tree4622a1809df6a6424f1b5f9f10c72dd02f9fc176 /lib/auth
downloadchessh-9cdfb6eb9cd30c4e06a7d9fef53e519983827d81.tar.gz
chessh-9cdfb6eb9cd30c4e06a7d9fef53e519983827d81.zip
Initial commit!
Diffstat (limited to 'lib/auth')
-rw-r--r--lib/auth/keys.ex8
-rw-r--r--lib/auth/password.ex7
2 files changed, 15 insertions, 0 deletions
diff --git a/lib/auth/keys.ex b/lib/auth/keys.ex
new file mode 100644
index 0000000..3e0f142
--- /dev/null
+++ b/lib/auth/keys.ex
@@ -0,0 +1,8 @@
+defmodule Chessh.Auth.KeyAuthenticator do
+ use Sshd.PublicKeyAuthenticator
+ require Logger
+
+ def authenticate(_, _, _) do
+ false
+ end
+end
diff --git a/lib/auth/password.ex b/lib/auth/password.ex
new file mode 100644
index 0000000..5e31b33
--- /dev/null
+++ b/lib/auth/password.ex
@@ -0,0 +1,7 @@
+defmodule Chessh.Auth.PasswordAuthenticator do
+ use Sshd.PasswordAuthenticator
+
+ def authenticate(_username, _password) do
+ true
+ end
+end