Class: Doorkeeper::TokenInfoController

Inherits:
ApplicationMetalController show all
Defined in:
app/controllers/doorkeeper/token_info_controller.rb

Instance Method Summary collapse

Instance Method Details

#showObject


5
6
7
8
9
10
11
12
13
# File 'app/controllers/doorkeeper/token_info_controller.rb', line 5

def show
  if doorkeeper_token&.accessible?
    render json: doorkeeper_token_to_json, status: :ok
  else
    error = OAuth::InvalidTokenResponse.new
    response.headers.merge!(error.headers)
    render json: error_to_json(error), status: error.status
  end
end