Sha256: d6d2f737232c5e40ae6e0823edebd7567b92c8384a57ea2ef34ea45fc76b9f95

Contents?: true

Size: 1.53 KB

Versions: 37

Compression:

Stored size: 1.53 KB

Contents

= Documentation for Session Expiration Feature

The session expiration feature allows setting an inactivity timeout and a max
lifetime for sessions.  When this feature is used, you should use
+rodauth.check_session_expiration+ at the top (or other appropriate place)
in your routing tree.

  route do |r|
    rodauth.check_session_expiration
    r.rodauth

    # ...
  end

When checking session expiration, if the last activity was more than the
inactivity timeout, or the session was created more the maximum lifetime
ago, the session is cleared, and the user is redirected to the login page.

== Auth Value Methods

max_session_lifetime :: The maximum number of seconds since session creation that sessions will be valid for, regardless of session activity. 86400 by default (1 day).
session_created_session_key :: The session key storing the session creation timestamp.
session_expiration_default :: Whether to expire sessions that don't have the created at or last activity at timestamps set, true by default.
session_expiration_error_flash :: The flash error to show if a session expires.
session_expiration_error_status :: The error status to use when a JSON request is made and the session has expired, 401 by default.
session_expiration_redirect :: Where to redirect if a session expires.
session_inactivity_timeout :: The maximum number of seconds allowed since the last activity before the session will be considered invalid.  1800 by default (30 minutes).
session_last_activity_session_key :: The session key storing the last session activity timestamp.

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
rodauth-2.16.0 doc/session_expiration.rdoc
rodauth-2.15.0 doc/session_expiration.rdoc
rodauth-2.14.0 doc/session_expiration.rdoc
rodauth-2.13.0 doc/session_expiration.rdoc
rodauth-2.12.0 doc/session_expiration.rdoc
rodauth-2.11.0 doc/session_expiration.rdoc
rodauth-2.10.0 doc/session_expiration.rdoc
rodauth-2.9.0 doc/session_expiration.rdoc
rodauth-2.8.0 doc/session_expiration.rdoc
rodauth-2.7.0 doc/session_expiration.rdoc
rodauth-2.6.0 doc/session_expiration.rdoc
rodauth-2.5.0 doc/session_expiration.rdoc
rodauth-2.4.0 doc/session_expiration.rdoc
rodauth-2.3.0 doc/session_expiration.rdoc
rodauth-2.2.0 doc/session_expiration.rdoc
rodauth-2.1.0 doc/session_expiration.rdoc
rodauth-2.0.0 doc/session_expiration.rdoc