Module: Bcome::Driver::Gcp::Authentication::Utilities

Included in:
Oauth
Defined in:
lib/objects/driver/gcp/authentication/utilities.rb

Instance Method Summary collapse

Instance Method Details

#oauth_redirect_bodyObject



31
32
33
34
35
36
37
38
39
40
# File 'lib/objects/driver/gcp/authentication/utilities.rb', line 31

def oauth_redirect_body
  <<-HTML
   <p>
     OAuth redirection for namespace <strong>#{@node.keyed_namespace}</strong> complete.
   </p>
   <p>
     You may close this window and return to the Bcome Console.
   </p>
  HTML
end

#oauth_redirect_htmlObject



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/objects/driver/gcp/authentication/utilities.rb', line 3

def oauth_redirect_html
  ## [GR] Style rules: Explicitly no assets to be pulled from bcome remote (no tracking). Inline styles only.
  ## Made an exception for the google font, as the user is already oauthing against google in any case.
  <<-HTML
    <html>
      <head>
        <script>
          function closeWindow() {
            window.open('', '_self', '');
            window.close();
          }
          setTimeout(closeWindow, 10);
        </script>
      </head>
      <style>
        @import url("https://fonts.googleapis.com/css2?family=Catamaran:wght@200;500&display=swap");

        body {
          font-family: 'Catamaran', sans-serif;
          font-weight: 200;
          color: #3E4E60;
        }
      </style>
      <body>#{oauth_redirect_body}</body>
    </html>
  HTML
end