aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/common_api/utils.ex
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2020-05-07 08:14:54 +0000
committerlain <lain@soykaf.club>2020-05-07 08:14:54 +0000
commitf4c2bf0985f3d65d9caa6f02a71c89db9f070fb1 (patch)
treea7f4ece6dcd0a534b464e455fa382d3ebd8f4d07 /lib/pleroma/web/common_api/utils.ex
parent68a126317d7cdd670c8e244319da08ff85639d33 (diff)
parent3d0c567fbc3506770fdac5f1269c45b244928747 (diff)
downloadpleroma-f4c2bf0985f3d65d9caa6f02a71c89db9f070fb1.tar.gz
Merge branch 'issue/209' into 'develop'
[#209] 2FA/two_factor_authentication support See merge request pleroma/pleroma!801
Diffstat (limited to 'lib/pleroma/web/common_api/utils.ex')
-rw-r--r--lib/pleroma/web/common_api/utils.ex1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/pleroma/web/common_api/utils.ex b/lib/pleroma/web/common_api/utils.ex
index 6540fa5d1..793f2e7f8 100644
--- a/lib/pleroma/web/common_api/utils.ex
+++ b/lib/pleroma/web/common_api/utils.ex
@@ -402,6 +402,7 @@ defmodule Pleroma.Web.CommonAPI.Utils do
end
end
+ @spec confirm_current_password(User.t(), String.t()) :: {:ok, User.t()} | {:error, String.t()}
def confirm_current_password(user, password) do
with %User{local: true} = db_user <- User.get_cached_by_id(user.id),
true <- AuthenticationPlug.checkpw(password, db_user.password_hash) do