From b80f78226a6d914660bd66bd60dd0e73ee6e9cef Mon Sep 17 00:00:00 2001 From: Artem Pylypenko Date: Thu, 10 Oct 2024 15:08:06 +0300 Subject: [PATCH] Update set_allowed_admin_auth_methods in admin.py After the changes in the following PRs: https://github.com/cisco-sbg/ZT-trustedpath/pull/15397/files https://github.com/cisco-sbg/ZT-trustedpath/pull/16174/files We need to update the file third-party/duo_client_python/project/duo_client/admin.py in duo_client_python as well. Ticket: https://cisco-sbg.atlassian.net/browse/ZTAEX-985 --- duo_client/admin.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/duo_client/admin.py b/duo_client/admin.py index 4159c2e..73e9bd4 100644 --- a/duo_client/admin.py +++ b/duo_client/admin.py @@ -2155,6 +2155,8 @@ def set_allowed_admin_auth_methods(self, mobile_otp_enabled=None, yubikey_enabled=None, hardware_token_enabled=None, + verified_push_enabled=None, + verified_push_length=None ): params = {} if push_enabled is not None: @@ -2175,6 +2177,12 @@ def set_allowed_admin_auth_methods(self, if voice_enabled is not None: params['voice_enabled'] = ( '1' if voice_enabled else '0') + if verified_push_enabled is not None: + params['verified_push_enabled'] = ( + '1' if verified_push_enabled else '0') + if params['verified_push_enabled'] == '1': + params['verified_push_length'] = ( + verified_push_length if verified_push_length is not None else 3) response = self.json_api_call( 'POST', '/admin/v1/admins/allowed_auth_methods',