From 49bee6935ac365098e00a906399aaa9598d679a2 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Fri, 5 May 2017 16:11:50 -0400 Subject: [PATCH] move identityserver libs into core --- src/Api/Api.csproj | 1 - src/Api/Startup.cs | 2 +- src/Core/Core.csproj | 1 + src/{Api => Core}/IdentityServer/AllowAllCorsPolicyService.cs | 2 +- src/{Api => Core}/IdentityServer/ApiResources.cs | 2 +- src/{Api => Core}/IdentityServer/Clients.cs | 2 +- src/{Api => Core}/IdentityServer/PersistedGrantStore.cs | 2 +- src/{Api => Core}/IdentityServer/ProfileService.cs | 2 +- .../IdentityServer/ResourceOwnerPasswordValidator.cs | 2 +- src/{Api => Core}/IdentityServer/TokenRetrieval.cs | 2 +- src/Identity/Identity.csproj | 4 ++++ 11 files changed, 13 insertions(+), 9 deletions(-) rename src/{Api => Core}/IdentityServer/AllowAllCorsPolicyService.cs (88%) rename src/{Api => Core}/IdentityServer/ApiResources.cs (95%) rename src/{Api => Core}/IdentityServer/Clients.cs (97%) rename src/{Api => Core}/IdentityServer/PersistedGrantStore.cs (98%) rename src/{Api => Core}/IdentityServer/ProfileService.cs (99%) rename src/{Api => Core}/IdentityServer/ResourceOwnerPasswordValidator.cs (99%) rename src/{Api => Core}/IdentityServer/TokenRetrieval.cs (96%) diff --git a/src/Api/Api.csproj b/src/Api/Api.csproj index a865acb20e..9e8595eb04 100644 --- a/src/Api/Api.csproj +++ b/src/Api/Api.csproj @@ -39,7 +39,6 @@ - diff --git a/src/Api/Startup.cs b/src/Api/Startup.cs index 1cc9cd86cd..5f12d44151 100644 --- a/src/Api/Startup.cs +++ b/src/Api/Startup.cs @@ -26,7 +26,7 @@ using IdentityServer4.Stores; using Bit.Core.Utilities; using Serilog; using Serilog.Events; -using Bit.Api.IdentityServer; +using Bit.Core.IdentityServer; using Bit.Core.Enums; using Microsoft.AspNetCore.DataProtection; using Microsoft.WindowsAzure.Storage; diff --git a/src/Core/Core.csproj b/src/Core/Core.csproj index e7b87f7b5b..22ed7c4db7 100644 --- a/src/Core/Core.csproj +++ b/src/Core/Core.csproj @@ -14,6 +14,7 @@ + diff --git a/src/Api/IdentityServer/AllowAllCorsPolicyService.cs b/src/Core/IdentityServer/AllowAllCorsPolicyService.cs similarity index 88% rename from src/Api/IdentityServer/AllowAllCorsPolicyService.cs rename to src/Core/IdentityServer/AllowAllCorsPolicyService.cs index 2cf6a19296..74934a9f98 100644 --- a/src/Api/IdentityServer/AllowAllCorsPolicyService.cs +++ b/src/Core/IdentityServer/AllowAllCorsPolicyService.cs @@ -1,7 +1,7 @@ using IdentityServer4.Services; using System.Threading.Tasks; -namespace Bit.Api.IdentityServer +namespace Bit.Core.IdentityServer { public class AllowAllCorsPolicyService : ICorsPolicyService { diff --git a/src/Api/IdentityServer/ApiResources.cs b/src/Core/IdentityServer/ApiResources.cs similarity index 95% rename from src/Api/IdentityServer/ApiResources.cs rename to src/Core/IdentityServer/ApiResources.cs index 3ac1d51bae..caa1fabe47 100644 --- a/src/Api/IdentityServer/ApiResources.cs +++ b/src/Core/IdentityServer/ApiResources.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Security.Claims; -namespace Bit.Api.IdentityServer +namespace Bit.Core.IdentityServer { public class ApiResources { diff --git a/src/Api/IdentityServer/Clients.cs b/src/Core/IdentityServer/Clients.cs similarity index 97% rename from src/Api/IdentityServer/Clients.cs rename to src/Core/IdentityServer/Clients.cs index 0f9966f9c4..9f8a369105 100644 --- a/src/Api/IdentityServer/Clients.cs +++ b/src/Core/IdentityServer/Clients.cs @@ -1,7 +1,7 @@ using IdentityServer4.Models; using System.Collections.Generic; -namespace Bit.Api.IdentityServer +namespace Bit.Core.IdentityServer { public class Clients { diff --git a/src/Api/IdentityServer/PersistedGrantStore.cs b/src/Core/IdentityServer/PersistedGrantStore.cs similarity index 98% rename from src/Api/IdentityServer/PersistedGrantStore.cs rename to src/Core/IdentityServer/PersistedGrantStore.cs index 7b2947d88a..c3e97aadc0 100644 --- a/src/Api/IdentityServer/PersistedGrantStore.cs +++ b/src/Core/IdentityServer/PersistedGrantStore.cs @@ -7,7 +7,7 @@ using Bit.Core.Repositories; using IdentityServer4.Models; using IdentityServer4.Stores; -namespace Bit.Api.IdentityServer +namespace Bit.Core.IdentityServer { public class PersistedGrantStore : IPersistedGrantStore { diff --git a/src/Api/IdentityServer/ProfileService.cs b/src/Core/IdentityServer/ProfileService.cs similarity index 99% rename from src/Api/IdentityServer/ProfileService.cs rename to src/Core/IdentityServer/ProfileService.cs index 4276b11dec..5d45932ee6 100644 --- a/src/Api/IdentityServer/ProfileService.cs +++ b/src/Core/IdentityServer/ProfileService.cs @@ -10,7 +10,7 @@ using System.Linq; using Microsoft.Extensions.Options; using System; -namespace Bit.Api.IdentityServer +namespace Bit.Core.IdentityServer { public class ProfileService : IProfileService { diff --git a/src/Api/IdentityServer/ResourceOwnerPasswordValidator.cs b/src/Core/IdentityServer/ResourceOwnerPasswordValidator.cs similarity index 99% rename from src/Api/IdentityServer/ResourceOwnerPasswordValidator.cs rename to src/Core/IdentityServer/ResourceOwnerPasswordValidator.cs index 26c97a2a6e..7e358fb85a 100644 --- a/src/Api/IdentityServer/ResourceOwnerPasswordValidator.cs +++ b/src/Core/IdentityServer/ResourceOwnerPasswordValidator.cs @@ -17,7 +17,7 @@ using System.Linq; using System.Security.Claims; using System.Threading.Tasks; -namespace Bit.Api.IdentityServer +namespace Bit.Core.IdentityServer { public class ResourceOwnerPasswordValidator : IResourceOwnerPasswordValidator { diff --git a/src/Api/IdentityServer/TokenRetrieval.cs b/src/Core/IdentityServer/TokenRetrieval.cs similarity index 96% rename from src/Api/IdentityServer/TokenRetrieval.cs rename to src/Core/IdentityServer/TokenRetrieval.cs index 84cfb7a6b0..cc67a3e227 100644 --- a/src/Api/IdentityServer/TokenRetrieval.cs +++ b/src/Core/IdentityServer/TokenRetrieval.cs @@ -2,7 +2,7 @@ using System; using System.Linq; -namespace Bit.Api.IdentityServer +namespace Bit.Core.IdentityServer { public static class TokenRetrieval { diff --git a/src/Identity/Identity.csproj b/src/Identity/Identity.csproj index 292a097273..47dd9bbf4f 100644 --- a/src/Identity/Identity.csproj +++ b/src/Identity/Identity.csproj @@ -9,5 +9,9 @@ + + + +