client: allow the expiry time to be specified for new keys

Adds a parameter for create key that allows a number of seconds
(less than 90) to be specified for new keys.

Fixes https://github.com/tailscale/tailscale/issues/7965

Signed-off-by: Matthew Brown <matthew@bargrove.com>
This commit is contained in:
Matt Brown
2023-05-12 06:05:18 +01:00
committed by GitHub
parent 85215ed58a
commit 9b6e48658f
4 changed files with 21 additions and 9 deletions

View File

@ -67,7 +67,7 @@ func main() {
},
}
authkey, _, err := tsClient.CreateKey(ctx, caps)
authkey, _, err := tsClient.CreateKey(ctx, caps, 0)
if err != nil {
log.Fatal(err.Error())
}