projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'issue/209' into 'develop'
[akkoma]
/
lib
/
pleroma
/
web
/
oauth
/
token
/
response.ex
diff --git
a/lib/pleroma/web/oauth/token/response.ex
b/lib/pleroma/web/oauth/token/response.ex
index 26611081439b75772fd32262d2cb94bdbac3caf8..0e72c31e90ff0bf16d6a71ef9ca75d6408f68952 100644
(file)
--- a/
lib/pleroma/web/oauth/token/response.ex
+++ b/
lib/pleroma/web/oauth/token/response.ex
@@
-1,10
+1,11
@@
# Pleroma: A lightweight social networking server
# Pleroma: A lightweight social networking server
-# Copyright © 2017-20
19
Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-20
20
Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.OAuth.Token.Response do
@moduledoc false
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.OAuth.Token.Response do
@moduledoc false
+ alias Pleroma.MFA
alias Pleroma.User
alias Pleroma.Web.OAuth.Token.Utils
alias Pleroma.User
alias Pleroma.Web.OAuth.Token.Utils
@@
-32,5
+33,13
@@
defmodule Pleroma.Web.OAuth.Token.Response do
}
end
}
end
+ def build_for_mfa_token(user, mfa_token) do
+ %{
+ error: "mfa_required",
+ mfa_token: mfa_token.token,
+ supported_challenge_types: MFA.supported_methods(user)
+ }
+ end
+
defp expires_in, do: Pleroma.Config.get([:oauth2, :token_expires_in], 600)
end
defp expires_in, do: Pleroma.Config.get([:oauth2, :token_expires_in], 600)
end