diff options
author | Mark Felder <feld@feld.me> | 2024-01-31 13:43:07 -0500 |
---|---|---|
committer | Mark Felder <feld@feld.me> | 2024-02-02 12:13:31 -0500 |
commit | 7745ee27bcedbe54be0479cd0561b74218acb8fe (patch) | |
tree | 1b2a33713c6e830849221cbf83a1117a1fdbae86 | |
parent | f933d24b02472352a2928c2987451ceef7208b34 (diff) | |
download | pleroma-7745ee27bcedbe54be0479cd0561b74218acb8fe.tar.gz pleroma-7745ee27bcedbe54be0479cd0561b74218acb8fe.zip |
Pleroma.MFA.Totp.provisioning_uri/3: add @spec
-rw-r--r-- | lib/pleroma/mfa/totp.ex | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/pleroma/mfa/totp.ex b/lib/pleroma/mfa/totp.ex index 429c4b700..96fa8d71d 100644 --- a/lib/pleroma/mfa/totp.ex +++ b/lib/pleroma/mfa/totp.ex @@ -14,6 +14,7 @@ defmodule Pleroma.MFA.TOTP do @doc """ https://github.com/google/google-authenticator/wiki/Key-Uri-Format """ + @spec provisioning_uri(String.t(), String.t(), list()) :: String.t() def provisioning_uri(secret, label, opts \\ []) do query = %{ @@ -27,7 +28,7 @@ defmodule Pleroma.MFA.TOTP do |> URI.encode_query() %URI{scheme: "otpauth", host: "totp", path: "/" <> label, query: query} - |> URI.to_string() + |> to_string() end defp default_period, do: Config.get(@config_ns ++ [:period]) |