OLD | NEW |
1 # Copyright 2013 The LUCI Authors. All rights reserved. | 1 # Copyright 2013 The LUCI Authors. All rights reserved. |
2 # Use of this source code is governed by the Apache v2.0 license that can be | 2 # Use of this source code is governed under the Apache License, Version 2.0 |
3 # found in the LICENSE file. | 3 # that can be found in the LICENSE file. |
4 | 4 |
5 """OAuth2 related utilities and implementation of browser based login flow.""" | 5 """OAuth2 related utilities and implementation of browser based login flow.""" |
6 | 6 |
7 # pylint: disable=W0613 | 7 # pylint: disable=W0613 |
8 | 8 |
9 import base64 | 9 import base64 |
10 import BaseHTTPServer | 10 import BaseHTTPServer |
11 import collections | 11 import collections |
12 import datetime | 12 import datetime |
13 import json | 13 import json |
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
592 self.end_headers() | 592 self.end_headers() |
593 query = self.path.split('?', 1)[-1] | 593 query = self.path.split('?', 1)[-1] |
594 query = dict(urlparse.parse_qsl(query)) | 594 query = dict(urlparse.parse_qsl(query)) |
595 self.server.query_params = query | 595 self.server.query_params = query |
596 self.wfile.write('<html><head><title>Authentication Status</title></head>') | 596 self.wfile.write('<html><head><title>Authentication Status</title></head>') |
597 self.wfile.write('<body><p>The authentication flow has completed.</p>') | 597 self.wfile.write('<body><p>The authentication flow has completed.</p>') |
598 self.wfile.write('</body></html>') | 598 self.wfile.write('</body></html>') |
599 | 599 |
600 def log_message(self, _format, *args): | 600 def log_message(self, _format, *args): |
601 """Do not log messages to stdout while running as command line program.""" | 601 """Do not log messages to stdout while running as command line program.""" |
OLD | NEW |