File tree 1 file changed +7
-5
lines changed
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 6
6
__author__ = 'Simon Robinson'
7
7
__copyright__ = 'Copyright (c) 2023 Simon Robinson'
8
8
__license__ = 'Apache 2.0'
9
- __version__ = '2023-11-18 ' # ISO 8601 (YYYY-MM-DD)
9
+ __version__ = '2023-11-19 ' # ISO 8601 (YYYY-MM-DD)
10
10
__package_version__ = '.' .join ([str (int (i )) for i in __version__ .split ('-' )]) # for pyproject.toml usage only
11
11
12
12
import abc
@@ -768,12 +768,14 @@ def get_account_with_catch_all_fallback(option):
768
768
AppConfig .save ()
769
769
770
770
else :
771
- # we used to keep tokens until the last possible moment here, but it is simpler to just obtain a
772
- # new one within TOKEN_EXPIRY_MARGIN, particularly when in CCG or ROPCG flow modes where getting
773
- # a new token involves no user interaction (note that in interactive mode it would be better to
771
+ # avoid trying invalid (or soon to be) tokens - we used to keep tokens until the last possible
772
+ # moment here, but it is simpler to just obtain a new one within TOKEN_EXPIRY_MARGIN, especially
773
+ # when in CCG/ROPCG/Google Cloud service account modes, for all of which getting a new token
774
+ # involves no interaction from the user (note that in interactive mode it would be better to
774
775
# request a new token via the user before discarding the existing one, but since this happens
775
776
# very infrequently, we don't add the extra complexity for just 10 extra minutes of token life)
776
- access_token = None # avoid trying invalid (or soon to be) tokens
777
+ cryptographer .decrypt (access_token ) # check request is valid (raises InvalidToken on failure)
778
+ access_token = None
777
779
else :
778
780
access_token = cryptographer .decrypt (access_token )
779
781
You can’t perform that action at this time.
0 commit comments