-
Notifications
You must be signed in to change notification settings - Fork 930
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use RawHttpMessageHandler and VssHttpRetryMessageHandler in ResultsHt…
…tpClient (#2908) * Set an explicit timeout on ResultsHttpClient * Hook up retry and standard message handler to ResultsHttpClient * Remove explicit timeout constructor * Fix linter
- Loading branch information
Showing
4 changed files
with
84 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using System; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
|
||
namespace GitHub.Services.Common | ||
{ | ||
// Set of classes used to bypass token operations | ||
// Results Service and External services follow a different auth model but | ||
// we are required to pass in a credentials object to create a RawHttpMessageHandler | ||
public class NoOpCredentials : FederatedCredential | ||
{ | ||
public NoOpCredentials(IssuedToken initialToken) : base(initialToken) | ||
{ | ||
} | ||
|
||
public override VssCredentialsType CredentialType { get; } | ||
protected override IssuedTokenProvider OnCreateTokenProvider(Uri serverUrl, IHttpResponse response) | ||
{ | ||
return null; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters