Sha256: 9aa241f5f5c575f6ec7024cc7917828411cc084c0ba68635d43e47dcaa99f433

Contents?: true

Size: 420 Bytes

Versions: 1

Compression:

Stored size: 420 Bytes

Contents

# Catch sessions that have been live for too long and kill them, forcing the user to reauthenticate.
Authenticate.lifecycle.after_set_user name: 'lifetimed after set_user', except: :authentication do |user, session, options|
  if user && user.respond_to?(:max_session_timedout?)
    throw(:failure, "Your session has reached it's maximum allowed lifetime, you must log in again") if user.max_session_timedout?
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
authenticate-0.2.0 lib/authenticate/callbacks/lifetimed.rb