Class: Doorkeeper::TokensController

Inherits:
ActionController::Metal
  • Object
show all
Includes:
Helpers::Controller
Defined in:
app/controllers/doorkeeper/tokens_controller.rb

Instance Method Summary collapse

Methods included from Helpers::Controller

#authenticate_admin!, #authenticate_resource_owner!, #current_resource_owner, #get_error_response_from_exception, #handle_token_exception, included, #resource_owner_from_credentials, #server, #skip_authorization?

Instance Method Details

#createObject



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

def create
  response = strategy.authorize
  self.headers.merge! response.headers
  self.response_body = response.body.to_json
  self.status        = response.status
rescue Errors::DoorkeeperError => e
  handle_token_exception e
end