Add option in OAuthCred to load authUrlV2. (#3777)

This commit is contained in:
Tingluo Huang
2025-03-31 17:05:41 -04:00
committed by GitHub
parent cdeec012aa
commit d47013928b
12 changed files with 187 additions and 38 deletions

View File

@@ -65,7 +65,7 @@ namespace GitHub.Runner.Listener
// Create connection.
Trace.Info("Loading Credentials");
_creds = _credMgr.LoadCredentials();
_creds = _credMgr.LoadCredentials(allowAuthUrlV2: false);
var agent = new TaskAgentReference
{
@@ -434,7 +434,7 @@ namespace GitHub.Runner.Listener
private async Task RefreshBrokerConnectionAsync()
{
Trace.Info("Reload credentials.");
_creds = _credMgr.LoadCredentials();
_creds = _credMgr.LoadCredentials(allowAuthUrlV2: false); // TODO: change to `true` in the next PR.
await _brokerServer.ConnectAsync(new Uri(_settings.ServerUrlV2), _creds);
Trace.Info("Connection to Broker Server recreated.");
}