Change the default client token expiration from None to the value set in the site config.

Review Request #13410 — Created Nov. 8, 2023 and submitted — Latest diff uploaded

Information

Review Board
release-5.0.x

Reviewers

Previously, the WebAPITokens.objects.get_or_create_client_token would create
client tokens with no expiration date by default. In most cases, we want to
create client tokens with the client_token_expiration value set in the site
configuration (e.g. 1 year from now). Instead of carrying around the logic for
this to multiple areas, this change makes this value the default expiration
for WebAPITokens.objects.get_or_create_client_token.

  • Tested creating client/using client tokens with RBTool's login.
  • Ran unit tests.

Changes between revision 1 and 2

orig
1
2

Commits

Summary ID Author
Change the default client token expiration from None to the value set in
the site config.
1855cee714cfb18d5c164edb3f306430ff48ba08 Michelle Aubin
Change the default client token expiration from None to the value set in
the site config.
4e6132d1dddbce11fc47b265d87c1bbea0fd2e32 Michelle Aubin
reviewboard/webapi/managers.py
Loading...