Sha256: cb237231e5b9555ca57b3a9d0e36f0f08a27c1bae7222dd2b5783a7f18e6f91a

Contents?: true

Size: 334 Bytes

Versions: 3

Compression:

Stored size: 334 Bytes

Contents

# frozen_string_literal: true

# @note This happens after
#   {DeviseSecurity::Controller::Helpers#handle_password_change}
Warden::Manager.after_authentication do |record, warden, options|
  if record.respond_to?(:need_change_password?)
    warden.session(options[:scope])['password_expired'] = record.need_change_password?
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
devise-security-0.17.0 lib/devise-security/hooks/password_expirable.rb
devise-security-0.16.0 lib/devise-security/hooks/password_expirable.rb
devise-security-0.15.0 lib/devise-security/hooks/password_expirable.rb