Skip to content

Commit 59bea22

Browse files
authored
fix ExecStatus (#881)
* fix ExecStatus * add missing file
1 parent 2488c24 commit 59bea22

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/KubernetesClient.Models/KubeConfigModels/ExecCredentialResponse.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ public class ExecCredentialResponse
55
public class ExecStatus
66
{
77
#nullable enable
8-
public DateTime? Expiry { get; set; }
8+
public DateTime? ExpirationTimestamp { get; set; }
99
public string? Token { get; set; }
1010
public string? ClientCertificateData { get; set; }
1111
public string? ClientKeyData { get; set; }

src/KubernetesClient/Authentication/ExecTokenProvider.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ private bool NeedsRefresh()
2323
return true;
2424
}
2525

26-
if (response.Status.Expiry == null)
26+
if (response.Status.ExpirationTimestamp == null)
2727
{
2828
return false;
2929
}
3030

31-
return DateTime.UtcNow.AddSeconds(30) > response.Status.Expiry;
31+
return DateTime.UtcNow.AddSeconds(30) > response.Status.ExpirationTimestamp;
3232
}
3333

3434
public async Task<AuthenticationHeaderValue> GetAuthenticationHeaderAsync(CancellationToken cancellationToken)

0 commit comments

Comments
 (0)