Sha256: 04ae4c983ec837cd33bfb83ec420c1cae0825e68d8bf1cad976447cc48323792
Contents?: true
Size: 480 Bytes
Versions: 1
Compression:
Stored size: 480 Bytes
Contents
module Martinet # HTTP/Warden session-specific behavior. class Session def initialize(warden) @warden = warden end def current_user(scope: nil) @warden.user(scope) end def signed_in?(scope: nil) @warden.user(scope) end def sign_in!(user, *args) @warden.set_user(user, *args) end def sign_out!(scope: nil) if scope @warden.logout(scope) else @warden.logout end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
martinet-0.0.3 | lib/martinet/session.rb |