From 8198f98376527c17d8ebd7b1c2d960cdec01e100 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Thu, 6 Dec 2018 12:26:42 +0900 Subject: [PATCH] Code simplification --- BTCPayServer/Security/BitpayAuthentication.cs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/BTCPayServer/Security/BitpayAuthentication.cs b/BTCPayServer/Security/BitpayAuthentication.cs index d62448532..56646b405 100644 --- a/BTCPayServer/Security/BitpayAuthentication.cs +++ b/BTCPayServer/Security/BitpayAuthentication.cs @@ -65,18 +65,14 @@ namespace BTCPayServer.Security { var result = await CheckBitId(Context.Request.HttpContext, bitpayAuth.Signature, bitpayAuth.Id, claims); storeId = result.StoreId; - failedAuth = !result.SuccessAuth; successAuth = result.SuccessAuth; + failedAuth = !successAuth; } else if (!string.IsNullOrEmpty(bitpayAuth.Authorization)) { storeId = await CheckLegacyAPIKey(Context.Request.HttpContext, bitpayAuth.Authorization); - if (storeId == null) - { - Logs.PayServer.LogDebug("API key check failed"); - failedAuth = true; - } successAuth = storeId != null; + failedAuth = !successAuth; } if (failedAuth)