Create a signal for expired API tokens.

Review Request #12589 — Created Sept. 12, 2022 and submitted — Latest diff uploaded

Information

Djblets
release-3.x

Reviewers

Create a signal for expired API tokens. This signal gets triggered when an
expired API token is used for authentication.

We also switch from using naive date objects to timezone-aware date objects in
API token related unit tests to ensure that test data can be properly compared
to the API token's timezone-aware date objects.

  • Created unit tests for the new signal and ran tests in
    djblets/webapi/tests/test_signals.py
  • Manually tested authenticating with expired and non expired tokens, confirmed
    that appropriate notifications were sent and triggered by the signal.

Diff Revision 2

This is not the most recent revision of the diff. The latest diff is revision 4. See what's changed.

orig
1
2
3
4

Commits

First Last Summary ID Author
Create a signal for expired API tokens.
a8fadd9d397f8a9bba97795acd7573f2b97a1c11 Michelle Aubin
djblets/webapi/signals.py
djblets/webapi/auth/backends/api_tokens.py
djblets/webapi/tests/test_api_auth_backend.py
djblets/webapi/tests/test_signals.py
Loading...