Sha256: b7ba132e6b08e6a9b7771630f37d2370afc37feb3902652d124ccdbc1e9d7198

Contents?: true

Size: 620 Bytes

Versions: 15

Compression:

Stored size: 620 Bytes

Contents

class RhoconnectConsole::Server
  
  get "/heroku/resources/:id" do
    begin
      # check heroku addon started app
      halt 403 unless ENV['INSTANCE_ID'] == params[:id]  && params[:token] == ENV['API_TOKEN']
      # rhoconnect authentication
      session[:login] = 'rhoadmin'
      session[:connect] = 'direct'     
      session[:token] = RhoconnectApi::get_token(session[:server],session[:login],ENV['PSWRD'])
    rescue Exception => e
      session[:token] = nil
      halt 403 
    end
    response.set_cookie('heroku-nav-data', :value => params[:nav], :path => '/')
    redirect url_path('/'), 303
  end
  
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
rhoconnect-3.1.2 lib/rhoconnect/console/app/routes/heroku.rb
rhoconnect-3.1.1 lib/rhoconnect/console/app/routes/heroku.rb
rhoconnect-3.1.0 lib/rhoconnect/console/app/routes/heroku.rb
rhoconnect-3.1.0.beta2 lib/rhoconnect/console/app/routes/heroku.rb
rhoconnect-3.1.0.beta1 lib/rhoconnect/console/app/routes/heroku.rb
rhoconnect-3.0.6 lib/rhoconnect/console/app/routes/heroku.rb
rhoconnect-3.0.5 lib/rhoconnect/console/app/routes/heroku.rb
rhoconnect-3.0.4 lib/rhoconnect/console/app/routes/heroku.rb
rhoconnect-3.0.3 lib/rhoconnect/console/app/routes/heroku.rb
rhoconnect-3.0.2 lib/rhoconnect/console/app/routes/heroku.rb
rhoconnect-3.0.1 lib/rhoconnect/console/app/routes/heroku.rb
rhoconnect-3.0.0 lib/rhoconnect/console/app/routes/heroku.rb
rhoconnect-3.0.0.rc1 lib/rhoconnect/console/app/routes/heroku.rb
rhoconnect-3.0.0.beta3 lib/rhoconnect/console/app/routes/heroku.rb
rhoconnect-3.0.0.beta1 lib/rhoconnect/console/app/routes/heroku.rb