Add userinfo oauth endpoint (#32548)
This commit is contained in:
parent
0a599d08d8
commit
e1b7382ea6
8 changed files with 112 additions and 12 deletions
11
app/controllers/oauth/userinfo_controller.rb
Normal file
11
app/controllers/oauth/userinfo_controller.rb
Normal file
|
@ -0,0 +1,11 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Oauth::UserinfoController < Api::BaseController
|
||||
before_action -> { doorkeeper_authorize! :profile }, only: [:show]
|
||||
before_action :require_user!
|
||||
|
||||
def show
|
||||
@account = current_account
|
||||
render json: @account, serializer: OauthUserinfoSerializer
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue