projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Mix pleroma.instance creates parent directories now
[akkoma]
/
lib
/
pleroma
/
web
/
router.ex
diff --git
a/lib/pleroma/web/router.ex
b/lib/pleroma/web/router.ex
index e2fe68faa4f8c47afdda3c9dc1e45bd247feb8d6..a9e332fa1c4ce3e298d3d2337385b7ad497df268 100644
(file)
--- a/
lib/pleroma/web/router.ex
+++ b/
lib/pleroma/web/router.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.Router do
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.Router do
@@
-34,6
+34,7
@@
defmodule Pleroma.Web.Router do
plug(:fetch_session)
plug(Pleroma.Web.Plugs.OAuthPlug)
plug(Pleroma.Web.Plugs.UserEnabledPlug)
plug(:fetch_session)
plug(Pleroma.Web.Plugs.OAuthPlug)
plug(Pleroma.Web.Plugs.UserEnabledPlug)
+ plug(Pleroma.Web.Plugs.EnsureUserTokenAssignsPlug)
end
pipeline :expect_authentication do
end
pipeline :expect_authentication do
@@
-48,15
+49,13
@@
defmodule Pleroma.Web.Router do
plug(Pleroma.Web.Plugs.OAuthPlug)
plug(Pleroma.Web.Plugs.BasicAuthDecoderPlug)
plug(Pleroma.Web.Plugs.UserFetcherPlug)
plug(Pleroma.Web.Plugs.OAuthPlug)
plug(Pleroma.Web.Plugs.BasicAuthDecoderPlug)
plug(Pleroma.Web.Plugs.UserFetcherPlug)
- plug(Pleroma.Web.Plugs.SessionAuthenticationPlug)
- plug(Pleroma.Web.Plugs.LegacyAuthenticationPlug)
plug(Pleroma.Web.Plugs.AuthenticationPlug)
end
pipeline :after_auth do
plug(Pleroma.Web.Plugs.UserEnabledPlug)
plug(Pleroma.Web.Plugs.SetUserSessionIdPlug)
plug(Pleroma.Web.Plugs.AuthenticationPlug)
end
pipeline :after_auth do
plug(Pleroma.Web.Plugs.UserEnabledPlug)
plug(Pleroma.Web.Plugs.SetUserSessionIdPlug)
- plug(Pleroma.Web.Plugs.EnsureUser
Key
Plug)
+ plug(Pleroma.Web.Plugs.EnsureUser
TokenAssigns
Plug)
end
pipeline :base_api do
end
pipeline :base_api do
@@
-100,7
+99,7
@@
defmodule Pleroma.Web.Router do
pipeline :pleroma_html do
plug(:browser)
plug(:authenticate)
pipeline :pleroma_html do
plug(:browser)
plug(:authenticate)
- plug(Pleroma.Web.Plugs.EnsureUser
Key
Plug)
+ plug(Pleroma.Web.Plugs.EnsureUser
TokenAssigns
Plug)
end
pipeline :well_known do
end
pipeline :well_known do
@@
-245,7
+244,7
@@
defmodule Pleroma.Web.Router do
delete("/chats/:id/messages/:message_id", ChatController, :delete_message)
get("/frontends", FrontendController, :index)
delete("/chats/:id/messages/:message_id", ChatController, :delete_message)
get("/frontends", FrontendController, :index)
- post("/frontends", FrontendController, :install)
+ post("/frontends
/install
", FrontendController, :install)
post("/backups", AdminAPIController, :create_backup)
end
post("/backups", AdminAPIController, :create_backup)
end
@@
-292,7
+291,6
@@
defmodule Pleroma.Web.Router do
post("/main/ostatus", UtilController, :remote_subscribe)
get("/ostatus_subscribe", RemoteFollowController, :follow)
post("/main/ostatus", UtilController, :remote_subscribe)
get("/ostatus_subscribe", RemoteFollowController, :follow)
-
post("/ostatus_subscribe", RemoteFollowController, :do_follow)
end
post("/ostatus_subscribe", RemoteFollowController, :do_follow)
end
@@
-321,19
+319,25
@@
defmodule Pleroma.Web.Router do
end
scope "/oauth", Pleroma.Web.OAuth do
end
scope "/oauth", Pleroma.Web.OAuth do
+ get("/registration_details", OAuthController, :registration_details)
+
+ post("/mfa/verify", MFAController, :verify, as: :mfa_verify)
+ get("/mfa", MFAController, :show)
+
scope [] do
pipe_through(:oauth)
scope [] do
pipe_through(:oauth)
+
get("/authorize", OAuthController, :authorize)
get("/authorize", OAuthController, :authorize)
+ post("/authorize", OAuthController, :create_authorization)
end
end
- post("/authorize", OAuthController, :create_authorization)
- post("/token", OAuthController, :token_exchange)
- post("/revoke", OAuthController, :token_revoke)
- get("/registration_details", OAuthController, :registration_details)
+ scope [] do
+ pipe_through(:fetch_session)
- post("/mfa/challenge", MFAController, :challenge)
- post("/mfa/verify", MFAController, :verify, as: :mfa_verify)
- get("/mfa", MFAController, :show)
+ post("/token", OAuthController, :token_exchange)
+ post("/revoke", OAuthController, :token_revoke)
+ post("/mfa/challenge", MFAController, :challenge)
+ end
scope [] do
pipe_through(:browser)
scope [] do
pipe_through(:browser)
@@
-401,6
+405,7
@@
defmodule Pleroma.Web.Router do
scope "/api/v1/pleroma", Pleroma.Web.PleromaAPI do
pipe_through(:api)
get("/accounts/:id/scrobbles", ScrobbleController, :index)
scope "/api/v1/pleroma", Pleroma.Web.PleromaAPI do
pipe_through(:api)
get("/accounts/:id/scrobbles", ScrobbleController, :index)
+ get("/federation_status", InstancesController, :show)
end
scope "/api/v1", Pleroma.Web.MastodonAPI do
end
scope "/api/v1", Pleroma.Web.MastodonAPI do