Module: Devise::Models::SessionLimitable
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/devise_security_extension/models/session_limitable.rb
Overview
SessionLimited ensures, that there is only one session usable per account at once. If someone logs in, and some other is logging in with the same credentials, the session from the first one is invalidated and not usable anymore. The first one is redirected to the sign page with a message, telling that someone used his credentials to sign in.
Instance Method Summary collapse
Instance Method Details
#update_unique_session_id!(unique_session_id) ⇒ Object
13 14 15 16 17 |
# File 'lib/devise_security_extension/models/session_limitable.rb', line 13 def update_unique_session_id!(unique_session_id) self.unique_session_id = unique_session_id save(:validate => false) end |