Skip to content

Remove desktoptoken methods from admin.py - #316

Merged
AaronAtDuo merged 1 commit into
duosecurity:masterfrom
gdonegan-at-duo:ZTDD-5963/remove-desktop-tokens
Nov 16, 2026
Merged

AaronAtDuo merged 1 commit into
duosecurity:masterfrom
gdonegan-at-duo:ZTDD-5963/remove-desktop-tokens

Conversation

@gdonegan-at-duo

@gdonegan-at-duo gdonegan-at-duo commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Description

Removes the desktoptoken methods and DESKTOP_TOKENS from duo_client/admin.py, plus the corresponding tests/admin/test_desktop_tokens.py. Specifically removes:

  • get_desktoptokens_generator()
  • get_desktoptokens()
  • get_desktoptoken_by_id()
  • add_desktoptoken()
  • delete_desktoptoken()
  • update_desktoptoken()
  • activate_desktoptoken()
  • DESKTOP_TOKENS docstring block

No version bump is included.

Motivation and Context

The /admin/v1/desktoptokens Admin API endpoint was removed server-side as part of the Duo Desktop Tokens deprecation. The SDK methods in this module now point at a non-existent endpoint, so any caller hitting them gets a runtime failure.

How Has This Been Tested?

  • Full nose2 suite passes locally (248 tests).
  • flake8 duo_client tests reports no errors.
  • Verified no residual references to desktoptoken / DESKTOP_TOKENS remain in duo_client/, tests/, or examples/.

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

External consumers currently calling these methods on the PyPI duo_client package will see AttributeError after upgrading. This is acceptable because the underlying API endpoint is already gone — the methods would fail at runtime regardless.

The /admin/v1/desktoptokens Admin API endpoint was removed server-side,
so these SDK methods now point at a non-existent endpoint. Removes:

* get_desktoptokens_generator, get_desktoptokens, get_desktoptoken_by_id,
  add_desktoptoken, delete_desktoptoken, update_desktoptoken,
  activate_desktoptoken
* DESKTOP_TOKENS response-shape docstring block
* tests/admin/test_desktop_tokens.py

This is a breaking change for external consumers of the PyPI duo_client
package. Version bump and release left to maintainers per the project's
existing release cadence.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@AaronAtDuo
AaronAtDuo merged commit 91a62d0 into duosecurity:master Nov 16, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants