mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
21 lines
451 B
Ruby
21 lines
451 B
Ruby
module Devise
|
|
module Hooks
|
|
# A small warden proxy so we can remember, forget and
|
|
# sign out users from hooks.
|
|
class Proxy #:nodoc:
|
|
include Devise::Controllers::Rememberable
|
|
include Devise::Controllers::SignInOut
|
|
|
|
attr_reader :warden
|
|
delegate :cookies, :env, to: :warden
|
|
|
|
def initialize(warden)
|
|
@warden = warden
|
|
end
|
|
|
|
def session
|
|
warden.request.session
|
|
end
|
|
end
|
|
end
|
|
end
|