Allow token refresh for GCP (#402)

This commit is contained in:
Andrew Stakhov
2020-04-28 18:34:25 -04:00
committed by GitHub
parent cfc4306528
commit ae9dd04a2e
10 changed files with 186 additions and 18 deletions

View File

@@ -306,8 +306,11 @@ namespace k8s
{
throw new ArgumentNullException(nameof(config));
}
if (!string.IsNullOrEmpty(config.AccessToken))
if (config.TokenProvider != null)
{
return new TokenCredentials(config.TokenProvider);
}
else if (!string.IsNullOrEmpty(config.AccessToken))
{
return new TokenCredentials(config.AccessToken);
}