Sha256: 76d47f66cd3d5c16934219392dd1f4d444a57d585896f4de6d61aea320ca3ec4

Contents?: true

Size: 901 Bytes

Versions: 3

Compression:

Stored size: 901 Bytes

Contents

get '/' do
  redirect '/login'
end

get '/login' do
  no_cache
  @presenter = Castronaut::Presenters::Login.new(self)
  @presenter.represent!
  @presenter.your_mission.call
end

post '/login' do
  @presenter = Castronaut::Presenters::ProcessLogin.new(self)
  @presenter.represent!
  @presenter.your_mission.call
end

get '/logout' do
  @presenter = Castronaut::Presenters::Logout.new(self)
  @presenter.represent!
  @presenter.your_mission.call
end

get '/serviceValidate' do
  @presenter = Castronaut::Presenters::ServiceValidate.new(self)
  @presenter.represent!
  @presenter.your_mission.call
end

get '/proxyValidate' do
  @presenter = Castronaut::Presenters::ProxyValidate.new(self)
  @presenter.represent!
  @presenter.your_mission.call
end

private

def no_cache
  response.headers.merge! 'Pragma' => 'no-cache',
  'Cache-Control' => 'no-store',
  'Expires' => (Time.now - 5.years).rfc2822
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
relevance-castronaut-0.7.4 app/controllers/application.rb
relevance-castronaut-0.7.5 app/controllers/application.rb
nbudin-castronaut-0.7.5 app/controllers/application.rb