Skip to content

Commit

Permalink
Update set_allowed_admin_auth_methods in admin.py (#277)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
cisco-apylypen authored Oct 14, 2024
1 parent 2893f23 commit 6a836df
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions duo_client/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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',
Expand Down

0 comments on commit 6a836df

Please sign in to comment.