diff options
author | lain <lain@soykaf.club> | 2020-07-09 13:10:05 +0000 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-07-09 13:10:05 +0000 |
commit | 8ca1f3e8c61b906387e9cb6fb8993d2ad496ab3d (patch) | |
tree | bbacb00a4ef2ae1a1c79b87ebf036baea3e4e6cc /lib/pleroma/web/api_spec | |
parent | f4469dc7419288a46512ea5cae6ffe32de5d47c2 (diff) | |
parent | 59540131c189afb10faf98d1bfeccf8f94985a90 (diff) | |
download | pleroma-8ca1f3e8c61b906387e9cb6fb8993d2ad496ab3d.tar.gz |
Merge branch '1723-token-fixes' into 'develop'
AccountController: Return scope in proper format.
Closes #1723
See merge request pleroma/pleroma!2694
Diffstat (limited to 'lib/pleroma/web/api_spec')
-rw-r--r-- | lib/pleroma/web/api_spec/operations/account_operation.ex | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/lib/pleroma/web/api_spec/operations/account_operation.ex b/lib/pleroma/web/api_spec/operations/account_operation.ex index 989bab122..b8c527606 100644 --- a/lib/pleroma/web/api_spec/operations/account_operation.ex +++ b/lib/pleroma/web/api_spec/operations/account_operation.ex @@ -447,6 +447,7 @@ defmodule Pleroma.Web.ApiSpec.AccountOperation do } end + # TODO: This is actually a token respone, but there's no oauth operation file yet. defp create_response do %Schema{ title: "AccountCreateResponse", @@ -455,14 +456,20 @@ defmodule Pleroma.Web.ApiSpec.AccountOperation do properties: %{ token_type: %Schema{type: :string}, access_token: %Schema{type: :string}, - scope: %Schema{type: :array, items: %Schema{type: :string}}, - created_at: %Schema{type: :integer, format: :"date-time"} + refresh_token: %Schema{type: :string}, + scope: %Schema{type: :string}, + created_at: %Schema{type: :integer, format: :"date-time"}, + me: %Schema{type: :string}, + expires_in: %Schema{type: :integer} }, example: %{ + "token_type" => "Bearer", "access_token" => "i9hAVVzGld86Pl5JtLtizKoXVvtTlSCJvwaugCxvZzk", + "refresh_token" => "i9hAVVzGld86Pl5JtLtizKoXVvtTlSCJvwaugCxvZzz", "created_at" => 1_585_918_714, - "scope" => ["read", "write", "follow", "push"], - "token_type" => "Bearer" + "expires_in" => 600, + "scope" => "read write follow push", + "me" => "https://gensokyo.2hu/users/raymoo" } } end |