module Trestle::Auth::ModelMethods::ClassMethods

Public Instance Methods

authenticate(identifier, password) click to toggle source
# File lib/trestle/auth/model_methods.rb, line 13
def authenticate(identifier, password)
  user = find_by(Trestle.config.auth.authenticate_with => identifier) || NullUser.new
  user if user.authenticate(password)
end