require 'doorkeeper/request/strategy' module Doorkeeper module Request class AuthorizationCode < Strategy delegate :client, :parameters, to: :server def request @request ||= OAuth::AuthorizationCodeRequest.new( Doorkeeper.configuration, grant, client, parameters ) end private def grant AccessGrant.by_token(parameters[:code]) end end end end