oauth: add me property to token responses

This commit is contained in:
William Pitcock 2019-03-16 01:12:50 +00:00
commit e0edc706cf
2 changed files with 7 additions and 3 deletions

View file

@ -132,11 +132,12 @@ defmodule Pleroma.Web.OAuth.OAuthControllerTest do
"client_secret" => app.client_secret
})
assert %{"access_token" => token} = json_response(conn, 200)
assert %{"access_token" => token, "me" => ap_id} = json_response(conn, 200)
token = Repo.get_by(Token, token: token)
assert token
assert token.scopes == auth.scopes
assert user.ap_id == ap_id
end
test "issues a token for `password` grant_type with valid credentials, with full permissions by default" do