Sha256: bb72811670fbe6ec5d453427b8f788062784cdd3e87c9e5297cc4646bd71586a

Contents?: true

Size: 492 Bytes

Versions: 2

Compression:

Stored size: 492 Bytes

Contents

# frozen_string_literal: true

module Kingsman
  module Hooks
    # A small warden proxy so we can remember, forget and
    # sign out users from hooks.
    class Proxy #:nodoc:
      include Kingsman::Controllers::Rememberable
      include Kingsman::Controllers::SignInOut

      attr_reader :warden
      delegate :cookies, :request, to: :warden

      def initialize(warden)
        @warden = warden
      end

      def session
        warden.request.session
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
kingsman-0.1.1 lib/kingsman/hooks/proxy.rb
kingsman-0.1.0 lib/kingsman/hooks/proxy.rb