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.36.0 doc/session_expiration.rdoc
rodauth-2.34.0 doc/session_expiration.rdoc
rodauth-2.33.0 doc/session_expiration.rdoc
rodauth-2.32.0 doc/session_expiration.rdoc
rodauth-2.31.0 doc/session_expiration.rdoc
rodauth-2.30.0 doc/session_expiration.rdoc
rodauth-2.29.0 doc/session_expiration.rdoc
rodauth-2.28.0 doc/session_expiration.rdoc
rodauth-2.27.0 doc/session_expiration.rdoc
rodauth-2.26.1 doc/session_expiration.rdoc
rodauth-2.26.0 doc/session_expiration.rdoc
rodauth-2.25.0 doc/session_expiration.rdoc
rodauth-2.24.0 doc/session_expiration.rdoc
rodauth-2.23.0 doc/session_expiration.rdoc
rodauth-2.22.0 doc/session_expiration.rdoc
rodauth-2.21.0 doc/session_expiration.rdoc
rodauth-2.20.0 doc/session_expiration.rdoc
rodauth-2.19.0 doc/session_expiration.rdoc
rodauth-2.18.0 doc/session_expiration.rdoc
rodauth-2.17.0 doc/session_expiration.rdoc