Skip to content

Commit

Permalink
fix ExecStatus (#881)
Browse files Browse the repository at this point in the history
* fix ExecStatus

* add missing file
  • Loading branch information
tg123 authored Jun 3, 2022
1 parent 2488c24 commit 59bea22
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public class ExecCredentialResponse
public class ExecStatus
{
#nullable enable
public DateTime? Expiry { get; set; }
public DateTime? ExpirationTimestamp { get; set; }
public string? Token { get; set; }
public string? ClientCertificateData { get; set; }
public string? ClientKeyData { get; set; }
Expand Down
4 changes: 2 additions & 2 deletions src/KubernetesClient/Authentication/ExecTokenProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ private bool NeedsRefresh()
return true;
}

if (response.Status.Expiry == null)
if (response.Status.ExpirationTimestamp == null)
{
return false;
}

return DateTime.UtcNow.AddSeconds(30) > response.Status.Expiry;
return DateTime.UtcNow.AddSeconds(30) > response.Status.ExpirationTimestamp;
}

public async Task<AuthenticationHeaderValue> GetAuthenticationHeaderAsync(CancellationToken cancellationToken)
Expand Down

0 comments on commit 59bea22

Please sign in to comment.