Support password changes for LDAP auth backend

This commit is contained in:
Mark Felder 2024-10-11 15:39:38 -04:00
commit 67cc38b5ac
2 changed files with 35 additions and 4 deletions

View file

@ -30,4 +30,13 @@ defmodule Pleroma.Web.Auth.LDAPAuthenticator do
error
end
end
def change_password(user, password, new_password, new_password) do
case GenServer.call(LDAP, {:change_password, user.nickname, password, new_password}) do
:ok -> {:ok, user}
e -> e
end
end
def change_password(_, _, _, _), do: {:error, :password_confirmation}
end