| 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 under the Apache License, Version 2.0 | 2 # Use of this source code is governed under the Apache License, Version 2.0 |
| 3 # that can be found in the LICENSE file. | 3 # that can be found in the LICENSE file. |
| 4 | 4 |
| 5 """This module defines Auth Server frontend url handlers.""" | 5 """This module defines Auth Server frontend url handlers.""" |
| 6 | 6 |
| 7 import os | 7 import os |
| 8 import base64 | 8 import base64 |
| 9 | 9 |
| 10 import webapp2 | 10 import webapp2 |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 } | 89 } |
| 90 | 90 |
| 91 | 91 |
| 92 ################################################################################ | 92 ################################################################################ |
| 93 ## API handlers. | 93 ## API handlers. |
| 94 | 94 |
| 95 | 95 |
| 96 class LinkTicketToken(auth.TokenKind): | 96 class LinkTicketToken(auth.TokenKind): |
| 97 """Parameters for ServiceLinkTicket.ticket token.""" | 97 """Parameters for ServiceLinkTicket.ticket token.""" |
| 98 expiration_sec = 24 * 3600 | 98 expiration_sec = 24 * 3600 |
| 99 secret_key = auth.SecretKey('link_ticket_token', scope='local') | 99 secret_key = auth.SecretKey('link_ticket_token') |
| 100 version = 1 | 100 version = 1 |
| 101 | 101 |
| 102 | 102 |
| 103 class AuthDBRevisionsHandler(auth.ApiHandler): | 103 class AuthDBRevisionsHandler(auth.ApiHandler): |
| 104 """Serves deflated AuthDB proto message with snapshot of all groups. | 104 """Serves deflated AuthDB proto message with snapshot of all groups. |
| 105 | 105 |
| 106 Args: | 106 Args: |
| 107 rev: version of the snapshot to get ('latest' or concrete revision number). | 107 rev: version of the snapshot to get ('latest' or concrete revision number). |
| 108 Not all versions may be available (i.e. there may be gaps in revision | 108 Not all versions may be available (i.e. there may be gaps in revision |
| 109 numbers). | 109 numbers). |
| (...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 ui_data_callback=get_additional_ui_data) | 442 ui_data_callback=get_additional_ui_data) |
| 443 template.bootstrap({'auth_service': TEMPLATES_DIR}) | 443 template.bootstrap({'auth_service': TEMPLATES_DIR}) |
| 444 | 444 |
| 445 # Add a fake admin for local dev server. | 445 # Add a fake admin for local dev server. |
| 446 if utils.is_local_dev_server(): | 446 if utils.is_local_dev_server(): |
| 447 auth.bootstrap_group( | 447 auth.bootstrap_group( |
| 448 auth.ADMIN_GROUP, | 448 auth.ADMIN_GROUP, |
| 449 [auth.Identity(auth.IDENTITY_USER, 'test@example.com')], | 449 [auth.Identity(auth.IDENTITY_USER, 'test@example.com')], |
| 450 'Users that can manage groups') | 450 'Users that can manage groups') |
| 451 return webapp2.WSGIApplication(get_routes(), debug=debug) | 451 return webapp2.WSGIApplication(get_routes(), debug=debug) |
| OLD | NEW |