activitypub: user view: add oauthRegistrationEndpoint to user profiles
authorWilliam Pitcock <nenolod@dereferenced.org>
Tue, 12 Feb 2019 21:49:48 +0000 (21:49 +0000)
committerWilliam Pitcock <nenolod@dereferenced.org>
Wed, 13 Feb 2019 19:34:43 +0000 (19:34 +0000)
lib/pleroma/web/activity_pub/views/user_view.ex

index 44beee728ac48af9a3d16636a2528e1322bda810..af75546dda7c75d623f43318341804b0fef870e0 100644 (file)
@@ -18,6 +18,7 @@ defmodule Pleroma.Web.ActivityPub.UserView do
   def render("endpoints.json", %{user: %User{local: true} = _user}) do
     %{
       "oauthAuthorizationEndpoint" => "#{Pleroma.Web.Endpoint.url()}/oauth/authorize",
+      "oauthRegistrationEndpoint" => "#{Pleroma.Web.Endpoint.url()}/api/v1/apps",
       "oauthTokenEndpoint" => "#{Pleroma.Web.Endpoint.url()}/oauth/token"
     }
     |> Map.merge(render("endpoints.json", %{user: nil}))