lib/doorkeeper/request/authorization_code.rb in doorkeeper-4.2.0 vs lib/doorkeeper/request/authorization_code.rb in doorkeeper-4.2.5

- old
+ new

@@ -1,18 +1,24 @@ require 'doorkeeper/request/strategy' module Doorkeeper module Request class AuthorizationCode < Strategy - delegate :grant, :client, :parameters, to: :server + 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