Class: Contentful::Bootstrap::OAuthEchoView

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

Instance Method Summary collapse

Instance Method Details

#renderObject



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/contentful/bootstrap/server.rb', line 10

def render
  <<-JS
  <html><head>
    <link rel="shortcut icon" type="image/png" href="https://www.contentful.com/assets/images/favicons/favicon-47dc5f9d.png"/>
    <link rel="shortcut icon" type="image/png" href="https://www.contentful.com/assets/images/favicons/favicon-47dc5f9d.png"/>
  </head><body>
  <script type="text/javascript">
    (function() {
      var access_token = window.location.hash.split('&')[0].split('=')[1];
      window.location.replace('http://localhost:5123/save_token?token=' + access_token);
    })();
  </script>
  </body></html>
  JS
end