Skip to content

Commit

Permalink
Style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
szh committed Nov 22, 2024
1 parent e1987df commit f2eadde
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 1 addition & 2 deletions conjur-api/ApiKeyAuthenticator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
using System.IO;
using System.Net;
using System.Net.Http;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Threading;

Expand All @@ -26,7 +25,7 @@ public class ApiKeyAuthenticator : IAuthenticator

private string token = null;
private Timer timer = null;
private HttpClient httpClient;
private readonly HttpClient httpClient;

/// <summary>
/// Initializes a new instance of the <see cref="Conjur.ApiKeyAuthenticator"/> class.
Expand Down
2 changes: 1 addition & 1 deletion test/AuthenticatorTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public void TestTokenCaching()
public void TestTokenThreadSafe()
{
int authenticationCount = 0;
Action<HttpRequestMessage> verifier = (HttpRequestMessage requestMessage) =>
var verifier = (HttpRequestMessage requestMessage) =>
{
ApiKeyVerifier(requestMessage);
Thread.Sleep(10);
Expand Down
2 changes: 2 additions & 0 deletions test/HostFactoryTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ public void TestCreateHost()
{
Assert.AreEqual(HttpMethod.Post, requestMessage.Method);
if (requestMessage.Headers.GetValues("Authorization").SingleOrDefault() != "Token token=\"host-factory-token\"")
{
throw new UnauthorizedException("Unauthorized", new HttpRequestException("Unauthorized"));
}
};

Assert.Throws<UnauthorizedException>(
Expand Down

0 comments on commit f2eadde

Please sign in to comment.