Sha256: 0ef4a7d0fbdbb0f3b73bebfbc76bb282a864f8113ca25a8040f34dccbbd46770

Contents?: true

Size: 920 Bytes

Versions: 18

Compression:

Stored size: 920 Bytes

Contents

module Castronaut
  module Adapters
    module Development
      
      class User < ActiveRecord::Base
      
        def self.authenticate(username, password)
          if user = find_by_login(username)
            if user.password == password
              Castronaut::AuthenticationResult.new(username, nil)
            else
              Castronaut.config.logger.info "#{self} - Unable to authenticate username #{username} due to invalid authentication information"
              Castronaut::AuthenticationResult.new(username, "Unable to authenticate the username #{username}")
            end
          else
            Castronaut.config.logger.info "#{self} - Unable to authenticate username #{username} because it could not be found"
            Castronaut::AuthenticationResult.new(username, "Unable to authenticate the username #{username}")
          end
        end
        
      end
    
    end
  end
end

Version data entries

18 entries across 18 versions & 4 rubygems

Version Path
3mix-castronaut-0.5.0.2 lib/castronaut/adapters/development/user.rb
masover-castronaut-0.4.4.4 lib/castronaut/adapters/development/user.rb
masover-castronaut-0.4.4.5 lib/castronaut/adapters/development/user.rb
masover-castronaut-0.5.0.1 lib/castronaut/adapters/development/user.rb
p8-castronaut-0.6.1.1 lib/castronaut/adapters/development/user.rb
relevance-castronaut-0.4.1 lib/castronaut/adapters/development/user.rb
relevance-castronaut-0.4.2 lib/castronaut/adapters/development/user.rb
relevance-castronaut-0.4.3 lib/castronaut/adapters/development/user.rb
relevance-castronaut-0.4.4 lib/castronaut/adapters/development/user.rb
relevance-castronaut-0.4.5 lib/castronaut/adapters/development/user.rb
relevance-castronaut-0.4.6 lib/castronaut/adapters/development/user.rb
relevance-castronaut-0.5.0 lib/castronaut/adapters/development/user.rb
relevance-castronaut-0.5.1 lib/castronaut/adapters/development/user.rb
relevance-castronaut-0.5.2 lib/castronaut/adapters/development/user.rb
relevance-castronaut-0.5.3 lib/castronaut/adapters/development/user.rb
relevance-castronaut-0.5.4 lib/castronaut/adapters/development/user.rb
relevance-castronaut-0.6.0 lib/castronaut/adapters/development/user.rb
relevance-castronaut-0.6.1 lib/castronaut/adapters/development/user.rb