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 4 (Latest)

orig
1
2
3
4

Commits

First Last Summary ID Author
Create a signal for expired API tokens.
b2c89cfc2dbf184b23b09e7819b1892ead21b5bc 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...