diff options
author | M Hickford <mirth.hickford@gmail.com> | 2023-06-16 22:55:06 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-06-16 23:06:57 +0300 |
commit | 0ce02e2feca6b0a7b09c71cf890d116de4e09f36 (patch) | |
tree | 7f584231994ec86ddff6da55621732870a9f520e /t/t0301-credential-cache.sh | |
parent | 0df2c180904f6b709766f9c24669a9d01543f915 (diff) |
credential/libsecret: store new attributes
d208bfd (credential: new attribute password_expiry_utc, 2023-02-18)
and a5c76569e7 (credential: new attribute oauth_refresh_token)
introduced new credential attributes.
libsecret assumes attribute values are non-confidential and
unchanging, so we encode the new attributes in the secret, separated by
newline:
hunter2
password_expiry_utc=1684189401
oauth_refresh_token=xyzzy
This is extensible and backwards compatible. The credential protocol
already assumes that attribute values do not contain newlines.
Alternatives considered: store password_expiry_utc in a libsecret
attribute. This has the problem that libsecret creates new items
rather than overwrites when attribute values change.
Signed-off-by: M Hickford <mirth.hickford@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t0301-credential-cache.sh')
-rwxr-xr-x | t/t0301-credential-cache.sh | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/t/t0301-credential-cache.sh b/t/t0301-credential-cache.sh index c02a3b5969..8300faadea 100755 --- a/t/t0301-credential-cache.sh +++ b/t/t0301-credential-cache.sh @@ -29,6 +29,7 @@ test_atexit 'git credential-cache exit' # test that the daemon works with no special setup helper_test cache +helper_test_password_expiry_utc cache helper_test_oauth_refresh_token cache test_expect_success 'socket defaults to ~/.cache/git/credential/socket' ' |