Sha256: 221f000374f35111fc50bca34fef62622a057ca6130c4ea26f84c01cc6716b85

Contents?: true

Size: 534 Bytes

Versions: 8

Compression:

Stored size: 534 Bytes

Contents

# frozen_string_literal: true

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
        raise Errors::MissingRequiredParameter, :code if parameters[:code].blank?

        AccessGrant.by_token(parameters[:code])
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
doorkeeper-5.2.6 lib/doorkeeper/request/authorization_code.rb
doorkeeper-5.2.5 lib/doorkeeper/request/authorization_code.rb
doorkeeper-5.2.4 lib/doorkeeper/request/authorization_code.rb
doorkeeper-5.2.3 lib/doorkeeper/request/authorization_code.rb
doorkeeper-5.2.2 lib/doorkeeper/request/authorization_code.rb
doorkeeper-5.2.1 lib/doorkeeper/request/authorization_code.rb
doorkeeper-5.2.0 lib/doorkeeper/request/authorization_code.rb
doorkeeper-5.2.0.rc3 lib/doorkeeper/request/authorization_code.rb