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.

Commits

Files

    Loading...