Sha256: 51c10b41d7eb7546058e7ca1dcfce8e98b463c522923efab339b958518a2f393
Contents?: true
Size: 618 Bytes
Versions: 20
Compression:
Stored size: 618 Bytes
Contents
# :nodoc: namespace module Authpwn # Common code for credentials that expire. module Expires extend ActiveSupport::Concern included do # Number of seconds after which a credential becomes unusable. # # Users can reset this timer by updating their credentials, e.g. changing # their password. class_attribute :expires_after, instance_writer: false end # True if this password is too old and should not be used for authentication. def expired? return false unless expires_after updated_at < Time.now - expires_after end end # module Authpwn::Expires end # namespace Authpwn
Version data entries
20 entries across 20 versions & 1 rubygems