Sha256: 8b763d461210a4d4365e34ab17c5a0d3661061b354b643cfc8baa85a71c93215
Contents?: true
Size: 537 Bytes
Versions: 31
Compression:
Stored size: 537 Bytes
Contents
module BookingSync::Engine::SessionHelpers extend ActiveSupport::Concern private # Automatically resets authorization when the session goes inactive. # This is only enabled when the engine is set to embedded mode. def sign_out_if_inactive return unless BookingSync::Engine.embedded last_visit = session[:_bookingsync_last_visit] session[:_bookingsync_last_visit] = Time.now.to_i if last_visit && (Time.now.to_i - last_visit > BookingSync::Engine.sign_out_after) clear_authorization! end end end
Version data entries
31 entries across 31 versions & 1 rubygems