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

Version Path
rhoconnect-3.4.5 spec/apps/rhotestapp/application.rb
rhoconnect-3.4.4 spec/apps/rhotestapp/application.rb
rhoconnect-3.4.3 spec/apps/rhotestapp/application.rb
rhoconnect-3.4.2 spec/apps/rhotestapp/application.rb
rhoconnect-3.3.6 spec/apps/rhotestapp/application.rb
rhoconnect-3.3.5 spec/apps/rhotestapp/application.rb
rhoconnect-3.3.4 spec/apps/rhotestapp/application.rb
rhoconnect-3.3.3 spec/apps/rhotestapp/application.rb
rhoconnect-3.3.2 spec/apps/rhotestapp/application.rb
rhoconnect-3.3.1 spec/apps/rhotestapp/application.rb
rhoconnect-3.3.1.beta4 spec/apps/rhotestapp/application.rb
rhoconnect-3.3.1.beta3 spec/apps/rhotestapp/application.rb
rhoconnect-3.3.1.beta2 spec/apps/rhotestapp/application.rb