| OLD | NEW |
| 1 # Copyright 2014 The LUCI Authors. All rights reserved. | 1 # Copyright 2014 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 """Auth management REST API.""" | 5 """Auth management REST API.""" |
| 6 | 6 |
| 7 import base64 | 7 import base64 |
| 8 import functools | 8 import functools |
| 9 import logging | 9 import logging |
| 10 import textwrap | 10 import textwrap |
| 11 import urllib | 11 import urllib |
| 12 import webapp2 | 12 import webapp2 |
| 13 | 13 |
| (...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 967 mode = 'replica' | 967 mode = 'replica' |
| 968 else: | 968 else: |
| 969 assert model.is_standalone() | 969 assert model.is_standalone() |
| 970 mode = 'standalone' | 970 mode = 'standalone' |
| 971 state = model.get_replication_state() or model.AuthReplicationState() | 971 state = model.get_replication_state() or model.AuthReplicationState() |
| 972 self.send_response({ | 972 self.send_response({ |
| 973 'auth_code_version': version.__version__, | 973 'auth_code_version': version.__version__, |
| 974 'mode': mode, | 974 'mode': mode, |
| 975 'replication_state': state.to_serializable_dict(), | 975 'replication_state': state.to_serializable_dict(), |
| 976 }) | 976 }) |
| OLD | NEW |