Sha256: fac39952967f4248d23472a95c3a2507377c2ab953146faabc4594143483dacd

Contents?: true

Size: 475 Bytes

Versions: 14

Compression:

Stored size: 475 Bytes

Contents

module Doorkeeper
  class TokensController < ActionController::Metal
    include Helpers::Controller

    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

  private

    def strategy
      @strategy ||= server.token_request params[:grant_type]
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
doorkeeper-0.7.4 app/controllers/doorkeeper/tokens_controller.rb
doorkeeper-0.7.3 app/controllers/doorkeeper/tokens_controller.rb
doorkeeper-0.7.2 app/controllers/doorkeeper/tokens_controller.rb
doorkeeper-0.7.1 app/controllers/doorkeeper/tokens_controller.rb
doorkeeper-0.7.0 app/controllers/doorkeeper/tokens_controller.rb
doorkeeper-0.6.7 app/controllers/doorkeeper/tokens_controller.rb
doorkeeper-0.6.6 app/controllers/doorkeeper/tokens_controller.rb
doorkeeper-0.6.5 app/controllers/doorkeeper/tokens_controller.rb
doorkeeper-0.6.4 app/controllers/doorkeeper/tokens_controller.rb
doorkeeper-0.6.3 app/controllers/doorkeeper/tokens_controller.rb
doorkeeper-0.6.2 app/controllers/doorkeeper/tokens_controller.rb
doorkeeper-0.6.1 app/controllers/doorkeeper/tokens_controller.rb
doorkeeper-0.6.0 app/controllers/doorkeeper/tokens_controller.rb
doorkeeper-0.6.0.rc1 app/controllers/doorkeeper/tokens_controller.rb