1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.BBS.Authenticator do
6 use Sshd.PasswordAuthenticator
9 def authenticate(username, password) do
10 username = to_string(username)
11 password = to_string(password)
13 with %User{} = user <- User.get_by_nickname(username) do
14 Pbkdf2.verify_pass(password, user.password_hash)