projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'bugfix/peertube-mpegURL-object' into 'develop'
[akkoma]
/
lib
/
pleroma
/
web
/
plugs
/
o_auth_plug.ex
diff --git
a/lib/pleroma/web/plugs/o_auth_plug.ex
b/lib/pleroma/web/plugs/o_auth_plug.ex
index a3b7d42f749dba5687f799d5d72f87536092361f..5e06ac3f68ea17a0111c4b560d91c2fe717414aa 100644
(file)
--- a/
lib/pleroma/web/plugs/o_auth_plug.ex
+++ b/
lib/pleroma/web/plugs/o_auth_plug.ex
@@
-1,5
+1,5
@@
# Pleroma: A lightweight social networking server
# Pleroma: A lightweight social networking server
-# Copyright © 2017-202
0
Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-202
1
Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.Plugs.OAuthPlug do
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.Plugs.OAuthPlug do
@@
-8,6
+8,7
@@
defmodule Pleroma.Web.Plugs.OAuthPlug do
import Plug.Conn
import Ecto.Query
import Plug.Conn
import Ecto.Query
+ alias Pleroma.Helpers.AuthHelper
alias Pleroma.Repo
alias Pleroma.User
alias Pleroma.Web.OAuth.App
alias Pleroma.Repo
alias Pleroma.User
alias Pleroma.Web.OAuth.App
@@
-98,7
+99,7
@@
defmodule Pleroma.Web.Plugs.OAuthPlug do
@spec fetch_token_from_session(Plug.Conn.t()) :: :no_token_found | {:ok, String.t()}
defp fetch_token_from_session(conn) do
@spec fetch_token_from_session(Plug.Conn.t()) :: :no_token_found | {:ok, String.t()}
defp fetch_token_from_session(conn) do
- case
get_session(conn, :oauth_toke
n) do
+ case
AuthHelper.get_session_token(con
n) do
nil -> :no_token_found
token -> {:ok, token}
end
nil -> :no_token_found
token -> {:ok, token}
end