staging/lib/vcap/staging/plugin/rails3/resources/cf-rails-console/lib/live_console/io_methods/socket_io/connection.rb
def authenticate
    authenticated = true
    raw_output.print "Login: "
    raw_output.flush
    username = raw_input.gets
    raw_output.print "Password: "
    password = raw_input.gets
    credentials_file= @opts[:credentials_file] || '.consoleaccess'
    credentials =YAML.load_file(credentials_file)
    if username.chomp != credentials['username'] || password.chomp != credentials['password']
      raw_output.puts "Login failed."
      authenticated = false
    end
    authenticated
  end
# Retrieves credentials from I/O and matches them against the specified file
# credentials_file should be of the form:
# username: <username>
# password: <password>
Retrieves credentials from I/O and matches them against the specified file
credentials_file should be of the form:
username: 
password: 
Retrieves credentials from I / O and matches them against the specified file credentials_file should be of the form : username : password :
def authenticate
    authenticated = true
    raw_output.print "Login: "
    raw_output.flush
    username = raw_input.gets
    raw_output.print "Password: "
    password = raw_input.gets
    credentials_file= @opts[:credentials_file] || '.consoleaccess'
    credentials =YAML.load_file(credentials_file)
    if username.chomp != credentials['username'] || password.chomp != credentials['password']
      raw_output.puts "Login failed."
      authenticated = false
    end
    authenticated
  end
def authenticate authenticated = true raw_output . print "Login: " raw_output . flush username = raw_input . gets raw_output . print "Password: " password = raw_input . gets credentials_file = @opts [ :credentials_file ] || '.consoleaccess' credentials = YAML . load_file ( credentials_file ) if username . chomp != credentials [ 'username' ] || password . chomp != credentials [ 'password' ] raw_output . puts "Login failed." authenticated = false end authenticated end
Retrieves credentials from I/O and matches them against the specified file
credentials_file should be of the form:
username: <username>
password: <password>
Retrieves credentials from I / O and matches them against the specified file credentials_file should be of the form : username : <username > password : <password >