Sha256: 433af6fb3512e8377e1fc3d47fff4edd5e377bc894d49b8d2904e39b743f231b

Contents?: true

Size: 575 Bytes

Versions: 12

Compression:

Stored size: 575 Bytes

Contents

# frozen_string_literal: true

module Doorkeeper
  module OAuth
    class TokenRequest
      attr_accessor :pre_auth, :resource_owner

      def initialize(pre_auth, resource_owner)
        @pre_auth       = pre_auth
        @resource_owner = resource_owner
      end

      def authorize
        auth = Authorization::Token.new(pre_auth, resource_owner)
        auth.issue_token
        CodeResponse.new(pre_auth, auth, response_on_fragment: true)
      end

      def deny
        pre_auth.error = :access_denied
        pre_auth.error_response
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
doorkeeper-5.2.6 lib/doorkeeper/oauth/token_request.rb
doorkeeper-5.3.3 lib/doorkeeper/oauth/token_request.rb
doorkeeper-5.2.5 lib/doorkeeper/oauth/token_request.rb
doorkeeper-5.3.2 lib/doorkeeper/oauth/token_request.rb
doorkeeper-5.2.4 lib/doorkeeper/oauth/token_request.rb
doorkeeper-5.3.1 lib/doorkeeper/oauth/token_request.rb
doorkeeper-5.3.0 lib/doorkeeper/oauth/token_request.rb
doorkeeper-5.2.3 lib/doorkeeper/oauth/token_request.rb
doorkeeper-5.2.2 lib/doorkeeper/oauth/token_request.rb
doorkeeper-5.2.1 lib/doorkeeper/oauth/token_request.rb
doorkeeper-5.2.0 lib/doorkeeper/oauth/token_request.rb
doorkeeper-5.2.0.rc3 lib/doorkeeper/oauth/token_request.rb