Sha256: bf65178a4c603bd8b4d937d9a8a4b06f7a0e394d05371e4949b097f9ecf717a4

Contents?: true

Size: 415 Bytes

Versions: 26

Compression:

Stored size: 415 Bytes

Contents

# frozen_string_literal: true

module Doorkeeper
  module OAuth
    module Hooks
      class Context
        attr_reader :auth, :pre_auth

        def initialize(**attributes)
          attributes.each do |name, value|
            instance_variable_set(:"@#{name}", value) if respond_to?(name)
          end
        end

        def issued_token
          auth&.issued_token
        end
      end
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
doorkeeper-5.5.0 lib/doorkeeper/oauth/hooks/context.rb
doorkeeper-5.5.0.rc2 lib/doorkeeper/oauth/hooks/context.rb
doorkeeper-5.5.0.rc1 lib/doorkeeper/oauth/hooks/context.rb
doorkeeper-5.4.0 lib/doorkeeper/oauth/hooks/context.rb
doorkeeper-5.4.0.rc2 lib/doorkeeper/oauth/hooks/context.rb
doorkeeper-5.4.0.rc1 lib/doorkeeper/oauth/hooks/context.rb