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

Version Path
spiderfw-0.5.13 apps/core/auth/lib/login_authenticator.rb
spiderfw-0.5.12 apps/core/auth/lib/login_authenticator.rb
spiderfw-0.5.11 apps/core/auth/lib/login_authenticator.rb
spiderfw-0.5.10 apps/core/auth/lib/login_authenticator.rb
spiderfw-0.5.9 apps/core/auth/lib/login_authenticator.rb
spiderfw-0.5.7 apps/core/auth/lib/login_authenticator.rb
spiderfw-0.5.6 apps/core/auth/lib/login_authenticator.rb
spiderfw-0.5.5 apps/core/auth/lib/login_authenticator.rb
spiderfw-0.5.4 apps/core/auth/lib/login_authenticator.rb
spiderfw-0.5.3 apps/core/auth/lib/login_authenticator.rb
spiderfw-0.5.2 apps/core/auth/lib/login_authenticator.rb
spiderfw-0.5.1 apps/core/auth/lib/login_authenticator.rb
spiderfw-0.5 apps/core/auth/lib/login_authenticator.rb