Class: Contentful::Bootstrap::IndexController

Inherits:
WEBrick::HTTPServlet::AbstractServlet
  • Object
show all
Defined in:
lib/contentful/bootstrap/server.rb

Instance Method Summary collapse

Instance Method Details

#do_GET(request, response) ⇒ Object



48
49
50
51
52
53
54
55
# File 'lib/contentful/bootstrap/server.rb', line 48

def do_GET(request, response)
  client_id = Contentful::Bootstrap::Constants::OAUTH_APP_ID
  redirect_uri = Contentful::Bootstrap::Constants::OAUTH_CALLBACK_URL
  scope = "content_management_manage"
  Launchy.open("https://be.contentful.com/oauth/authorize?response_type=token&client_id=#{client_id}&redirect_uri=#{redirect_uri}&scope=#{scope}")
  response.status = 200
  response.body = ""
end