Method: Cms::Authentication::Model::ClassMethods#authenticate

Defined in:
lib/cms/authentication/model.rb

#authenticate(login, password) ⇒ Object



20
21
22
23
# File 'lib/cms/authentication/model.rb', line 20

def authenticate(, password)
  u = () # need to get the salt
  u && u.authenticated?(password) && !u.expired? ? u : nil
end