1
0
Fork 0
mirror of https://git.pleroma.social/pleroma/pleroma.git synced 2026-02-15 17:16:57 +00:00

Change redirect_uris to accept array of strings

This commit is contained in:
MediaFormat 2026-01-11 01:12:42 +00:00
parent 792d473778
commit aa95855a7f

View file

@ -123,7 +123,7 @@ defmodule Pleroma.Web.ApiSpec.Admin.OAuthAppOperation do
name: %Schema{type: :string, description: "Application Name"}, name: %Schema{type: :string, description: "Application Name"},
scopes: %Schema{type: :array, items: %Schema{type: :string}, description: "oAuth scopes"}, scopes: %Schema{type: :array, items: %Schema{type: :string}, description: "oAuth scopes"},
redirect_uris: %Schema{ redirect_uris: %Schema{
type: :string, type: :array, items: %Schema{type: :string},
description: description:
"Where the user should be redirected after authorization. To display the authorization code to the user instead of redirecting to a web page, use `urn:ietf:wg:oauth:2.0:oob` in this parameter." "Where the user should be redirected after authorization. To display the authorization code to the user instead of redirecting to a web page, use `urn:ietf:wg:oauth:2.0:oob` in this parameter."
}, },
@ -141,7 +141,7 @@ defmodule Pleroma.Web.ApiSpec.Admin.OAuthAppOperation do
}, },
example: %{ example: %{
"name" => "My App", "name" => "My App",
"redirect_uris" => "https://myapp.com/auth/callback", "redirect_uris" => ["https://myapp.com/auth/callback"],
"website" => "https://myapp.com/", "website" => "https://myapp.com/",
"scopes" => ["read", "write"], "scopes" => ["read", "write"],
"trusted" => true "trusted" => true
@ -157,7 +157,7 @@ defmodule Pleroma.Web.ApiSpec.Admin.OAuthAppOperation do
name: %Schema{type: :string, description: "Application Name"}, name: %Schema{type: :string, description: "Application Name"},
scopes: %Schema{type: :array, items: %Schema{type: :string}, description: "oAuth scopes"}, scopes: %Schema{type: :array, items: %Schema{type: :string}, description: "oAuth scopes"},
redirect_uris: %Schema{ redirect_uris: %Schema{
type: :string, type: :array, items: %Schema{type: :string},
description: description:
"Where the user should be redirected after authorization. To display the authorization code to the user instead of redirecting to a web page, use `urn:ietf:wg:oauth:2.0:oob` in this parameter." "Where the user should be redirected after authorization. To display the authorization code to the user instead of redirecting to a web page, use `urn:ietf:wg:oauth:2.0:oob` in this parameter."
}, },
@ -175,7 +175,7 @@ defmodule Pleroma.Web.ApiSpec.Admin.OAuthAppOperation do
}, },
example: %{ example: %{
"name" => "My App", "name" => "My App",
"redirect_uris" => "https://myapp.com/auth/callback", "redirect_uris" => ["https://myapp.com/auth/callback"],
"website" => "https://myapp.com/", "website" => "https://myapp.com/",
"scopes" => ["read", "write"], "scopes" => ["read", "write"],
"trusted" => true "trusted" => true