Module: Authpwn::Expires

Extended by:
ActiveSupport::Concern
Defined in:
lib/authpwn_rails/expires.rb

Overview

Common code for credentials that expire.

Instance Method Summary collapse

Instance Method Details

#expired?Boolean

True if this password is too old and should not be used for authentication.

Returns:

  • (Boolean)


17
18
19
20
# File 'lib/authpwn_rails/expires.rb', line 17

def expired?
  return false unless expires_after
  updated_at < Time.current - expires_after
end