Sha256: 23404f79ea9d1c9c439d5a6118d43ce73b57dceb5f3ee984bcd4bed0728bd529
Contents?: true
Size: 762 Bytes
Versions: 13
Compression:
Stored size: 762 Bytes
Contents
require 'apps/core/auth/lib/authenticable' module Spider; module Auth module LoginAuthenticator include Authenticable def self.included(klass) klass.extend(ClassMethods) klass.extend(Authenticable::ClassMethods) klass.register_authentication(:login) end module ClassMethods def authenticate_login(params) user = self.load(:username => params[:username]) return nil unless user return nil unless user.password && Spider::DataTypes::Password.check_match(user.password, params[:password]) return user end end end end; end
Version data entries
13 entries across 13 versions & 1 rubygems