From 60e0f775ed833c1e6538d10c66d52396d6333eeb Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Sun, 12 Jan 2020 15:59:54 +0900 Subject: [PATCH] Remove useless dependencies --- BTCPayServer.Tests/AuthenticationTests.cs | 5 +---- BTCPayServer/BTCPayServer.csproj | 4 +--- BTCPayServer/Controllers/AuthorizationController.cs | 1 - BTCPayServer/Hosting/BTCPayServerServices.cs | 2 -- BTCPayServer/Security/OpenId/LogoutEventHandler.cs | 1 - .../Security/OpenId/OpenIdGrantHandlerCheckCanSignIn.cs | 1 - nuget.config | 4 ---- 7 files changed, 2 insertions(+), 16 deletions(-) diff --git a/BTCPayServer.Tests/AuthenticationTests.cs b/BTCPayServer.Tests/AuthenticationTests.cs index 886702b69..47cb10f85 100644 --- a/BTCPayServer.Tests/AuthenticationTests.cs +++ b/BTCPayServer.Tests/AuthenticationTests.cs @@ -6,8 +6,6 @@ using System.Net; using System.Threading.Tasks; using System.Security.Claims; using BTCPayServer.Tests.Logging; -using Microsoft.AspNetCore.Authentication.OpenIdConnect; -using Microsoft.IdentityModel.Protocols.OpenIdConnect; using Xunit; using Xunit.Abstractions; using System.Net.Http; @@ -66,8 +64,7 @@ namespace BTCPayServer.Tests { var json = await streamToReadFrom.ReadToEndAsync(); Assert.NotNull(json); - var configuration = OpenIdConnectConfiguration.Create(json); - Assert.NotNull(configuration); + JObject.Parse(json); // Should do more tests but good enough } } } diff --git a/BTCPayServer/BTCPayServer.csproj b/BTCPayServer/BTCPayServer.csproj index e2c159b32..acb56c1b2 100644 --- a/BTCPayServer/BTCPayServer.csproj +++ b/BTCPayServer/BTCPayServer.csproj @@ -67,9 +67,7 @@ - - - + diff --git a/BTCPayServer/Controllers/AuthorizationController.cs b/BTCPayServer/Controllers/AuthorizationController.cs index f0b37680d..21396e2c8 100644 --- a/BTCPayServer/Controllers/AuthorizationController.cs +++ b/BTCPayServer/Controllers/AuthorizationController.cs @@ -22,7 +22,6 @@ using OpenIddict.Abstractions; using OpenIddict.Core; using OpenIddict.Server; using System.Security.Claims; -using Microsoft.AspNetCore.Authentication.OpenIdConnect; using OpenIddict.Server.AspNetCore; namespace BTCPayServer.Controllers diff --git a/BTCPayServer/Hosting/BTCPayServerServices.cs b/BTCPayServer/Hosting/BTCPayServerServices.cs index 0fb69e135..3f50a8d62 100644 --- a/BTCPayServer/Hosting/BTCPayServerServices.cs +++ b/BTCPayServer/Hosting/BTCPayServerServices.cs @@ -2,7 +2,6 @@ using BTCPayServer.Services.Altcoins.Monero; using Microsoft.Extensions.Logging; using System; -using System.IdentityModel.Tokens.Jwt; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; using Microsoft.AspNetCore.Http; @@ -48,7 +47,6 @@ using System.Diagnostics; using System.Security.Claims; using System.Threading.Tasks; using BTCPayServer.Models; -using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Routing; diff --git a/BTCPayServer/Security/OpenId/LogoutEventHandler.cs b/BTCPayServer/Security/OpenId/LogoutEventHandler.cs index 58d3d419f..fc42d0e6c 100644 --- a/BTCPayServer/Security/OpenId/LogoutEventHandler.cs +++ b/BTCPayServer/Security/OpenId/LogoutEventHandler.cs @@ -3,7 +3,6 @@ using System.Threading.Tasks; using BTCPayServer.Data; using BTCPayServer.Models; using Microsoft.AspNetCore.Authentication; -using Microsoft.AspNetCore.Authentication.OpenIdConnect; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Identity; using Microsoft.Extensions.Options; diff --git a/BTCPayServer/Security/OpenId/OpenIdGrantHandlerCheckCanSignIn.cs b/BTCPayServer/Security/OpenId/OpenIdGrantHandlerCheckCanSignIn.cs index 0ed4bac9b..cd353d65d 100644 --- a/BTCPayServer/Security/OpenId/OpenIdGrantHandlerCheckCanSignIn.cs +++ b/BTCPayServer/Security/OpenId/OpenIdGrantHandlerCheckCanSignIn.cs @@ -8,7 +8,6 @@ using Microsoft.Extensions.Options; using OpenIddict.Core; using OpenIddict.Server; using Microsoft.AspNetCore; -using Microsoft.AspNetCore.Authentication.OpenIdConnect; using OpenIddict.Server.AspNetCore; namespace BTCPayServer.Security.OpenId diff --git a/nuget.config b/nuget.config index 29f81a89e..6fa16d23e 100644 --- a/nuget.config +++ b/nuget.config @@ -3,10 +3,6 @@ - - - -