Clinical Sync Batch Engine: first commit
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
public static class GatewayAuthHelper
|
||||
{
|
||||
public const string DevGatewayKey = "dev-gateway-key-change-in-production";
|
||||
|
||||
public static void WithGatewayApiKey(
|
||||
this HttpClient client, Guid gatewayId, string? apiKey = null)
|
||||
{
|
||||
client.DefaultRequestHeaders.Remove("X-Api-Key");
|
||||
client.DefaultRequestHeaders.Remove("X-Gateway-Id");
|
||||
client.DefaultRequestHeaders.Add("X-Api-Key", apiKey ?? DevGatewayKey);
|
||||
client.DefaultRequestHeaders.Add("X-Gateway-Id", gatewayId.ToString());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user