OLD | NEW |
1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 from autotest_lib.client.common_lib import error | 5 from autotest_lib.client.common_lib import error |
6 from autotest_lib.client.cros import auth_server, ui_test | 6 from autotest_lib.client.cros import auth_server, cros_ui_test |
7 | 7 |
8 class login_SecondFactor(ui_test.UITest): | 8 class login_SecondFactor(cros_ui_test.UITest): |
9 version = 1 | 9 version = 1 |
| 10 auto_login = False |
10 | 11 |
11 auto_login = False | |
12 | 12 |
13 def __login_denier(self, handler, url_args): | 13 def __login_denier(self, handler, url_args): |
14 handler.send_response(403) | 14 handler.send_response(403) |
15 handler.end_headers() | 15 handler.end_headers() |
16 handler.wfile.write('Error=BadAuthentication\n') | 16 handler.wfile.write('Error=BadAuthentication\n') |
17 handler.wfile.write('Info=InvalidSecondFactor') | 17 handler.wfile.write('Info=InvalidSecondFactor') |
18 | 18 |
19 | 19 |
20 def start_authserver(self): | 20 def start_authserver(self): |
21 self._authServer = auth_server.GoogleAuthServer( | 21 self._authServer = auth_server.GoogleAuthServer( |
22 cl_responder=self.__login_denier) | 22 cl_responder=self.__login_denier) |
23 self._authServer.run() | 23 self._authServer.run() |
24 self.use_local_dns() | 24 self.use_local_dns() |
25 | 25 |
26 | 26 |
27 def run_once(self): | 27 def run_once(self): |
28 pass | 28 pass |
OLD | NEW |