Sha256: 0d98bcb60ac8c5436cc3fca163f3163d6424c7e8e81f7c9ed3cfdee379bdfb16
Contents?: true
Size: 706 Bytes
Versions: 13
Compression:
Stored size: 706 Bytes
Contents
class Application < Rhoconnect::Base class << self def authenticate(username,password,session) session[:auth] = "delegated" raise RuntimeError.new('server error') if password == 'server error' raise LoginException.new('login exception') if password == 'wrongpass' return "different" if password == "diffuser" password == 'wrongpassnomsg' ? false : true end # Add hooks for application startup here # Don't forget to call super at the end! def initializer(path) super end def ans_authenticate(username, password) 'ansuser:secret' == [username,password].join(':') end end end Application.initializer(File.dirname(__FILE__))
Version data entries
13 entries across 13 versions & 1 rubygems