MCPcopy Create free account
hub / github.com/Dispatcharr/Dispatcharr / _verify_task_token

Function _verify_task_token

apps/backups/api_views.py:31–34  ·  view source on GitHub ↗

Verify a task token is valid.

(task_id: str, token: str)

Source from the content-addressed store, hash-verified

29
30
31def _verify_task_token(task_id: str, token: str) -> bool:
32 """Verify a task token is valid."""
33 expected = _generate_task_token(task_id)
34 return hmac.compare_digest(expected, token)
35
36
37@api_view(["GET"])

Callers 2

backup_statusFunction · 0.85
download_backupFunction · 0.85

Calls 1

_generate_task_tokenFunction · 0.85

Tested by

no test coverage detected