From 3f756adac375b6e9ff9b4c570a560725bb47c136 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Mon, 24 Jul 2017 13:56:56 -0700 Subject: [PATCH 01/16] Change xunit version in specs to 2.2.0 --- .../Microsoft.AspNetCore.Identity.Specification.Tests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.AspNetCore.Identity.Specification.Tests/Microsoft.AspNetCore.Identity.Specification.Tests.csproj b/src/Microsoft.AspNetCore.Identity.Specification.Tests/Microsoft.AspNetCore.Identity.Specification.Tests.csproj index 7a077cfc99..6133bad678 100644 --- a/src/Microsoft.AspNetCore.Identity.Specification.Tests/Microsoft.AspNetCore.Identity.Specification.Tests.csproj +++ b/src/Microsoft.AspNetCore.Identity.Specification.Tests/Microsoft.AspNetCore.Identity.Specification.Tests.csproj @@ -17,7 +17,7 @@ - + From 8cbda5a23dd594116fcd2f60c486d15fa50051af Mon Sep 17 00:00:00 2001 From: Pranav K Date: Thu, 17 Aug 2017 15:00:01 -0700 Subject: [PATCH 02/16] Pinning versions for 2.0.0 --- NuGet.config | 2 +- build/dependencies.props | 17 +++++++++-------- ...ity.EntityFrameworkCore.InMemory.Test.csproj | 2 +- ...ore.Identity.EntityFrameworkCore.Test.csproj | 2 +- ...oft.AspNetCore.Identity.InMemory.Test.csproj | 2 +- ...re.Identity.Service.Abstractions.Test.csproj | 2 +- ...AspNetCore.Identity.Service.Core.Test.csproj | 2 +- ...ice.EntityFrameworkCore.InMemory.Test.csproj | 4 ++-- ...tity.Service.EntityFrameworkCore.Test.csproj | 4 ++-- ...etCore.Identity.Service.InMemory.Test.csproj | 4 ++-- ...soft.AspNetCore.Identity.Service.Test.csproj | 2 +- .../Microsoft.AspNetCore.Identity.Test.csproj | 2 +- version.props | 1 - 13 files changed, 23 insertions(+), 23 deletions(-) diff --git a/NuGet.config b/NuGet.config index 37f0d27ea0..6a62aeda63 100644 --- a/NuGet.config +++ b/NuGet.config @@ -2,7 +2,7 @@ - + diff --git a/build/dependencies.props b/build/dependencies.props index 56abb2d0df..a5dd6b500b 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -1,19 +1,20 @@  - 2.0.0-* + 2.0.0 2.3.2 3.14.1 2.1.4 - 4.4.0-* + 4.4.0 2.2.1 - 2.0.1-* + 2.0.1-rtm-15400 4.7.49 - 2.0.0-* - 2.0.0-* + 2.0.0 + 2.0.0 3.0.1 - 2.0.0-* - 15.3.0-* - 2.3.0-beta2-* + 2.0.0 + 15.3.0 + 2.3.0-beta2-build3683 + 2.3.0-beta2-build1317 2.2.0 diff --git a/test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.InMemory.Test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.InMemory.Test.csproj b/test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.InMemory.Test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.InMemory.Test.csproj index 1ab9e08306..50edce94d9 100644 --- a/test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.InMemory.Test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.InMemory.Test.csproj +++ b/test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.InMemory.Test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.InMemory.Test.csproj @@ -25,7 +25,7 @@ - + diff --git a/test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test.csproj b/test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test.csproj index 146f87fedc..1a6497130d 100644 --- a/test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test.csproj +++ b/test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test.csproj @@ -31,7 +31,7 @@ - + diff --git a/test/Microsoft.AspNetCore.Identity.InMemory.Test/Microsoft.AspNetCore.Identity.InMemory.Test.csproj b/test/Microsoft.AspNetCore.Identity.InMemory.Test/Microsoft.AspNetCore.Identity.InMemory.Test.csproj index f48a04e335..2f8eb65950 100644 --- a/test/Microsoft.AspNetCore.Identity.InMemory.Test/Microsoft.AspNetCore.Identity.InMemory.Test.csproj +++ b/test/Microsoft.AspNetCore.Identity.InMemory.Test/Microsoft.AspNetCore.Identity.InMemory.Test.csproj @@ -24,7 +24,7 @@ - + diff --git a/test/Microsoft.AspNetCore.Identity.Service.Abstractions.Test/Microsoft.AspNetCore.Identity.Service.Abstractions.Test.csproj b/test/Microsoft.AspNetCore.Identity.Service.Abstractions.Test/Microsoft.AspNetCore.Identity.Service.Abstractions.Test.csproj index ca4db80f11..a18986a50a 100644 --- a/test/Microsoft.AspNetCore.Identity.Service.Abstractions.Test/Microsoft.AspNetCore.Identity.Service.Abstractions.Test.csproj +++ b/test/Microsoft.AspNetCore.Identity.Service.Abstractions.Test/Microsoft.AspNetCore.Identity.Service.Abstractions.Test.csproj @@ -14,7 +14,7 @@ - + diff --git a/test/Microsoft.AspNetCore.Identity.Service.Core.Test/Microsoft.AspNetCore.Identity.Service.Core.Test.csproj b/test/Microsoft.AspNetCore.Identity.Service.Core.Test/Microsoft.AspNetCore.Identity.Service.Core.Test.csproj index 68623b6b39..2bf15ae0a2 100644 --- a/test/Microsoft.AspNetCore.Identity.Service.Core.Test/Microsoft.AspNetCore.Identity.Service.Core.Test.csproj +++ b/test/Microsoft.AspNetCore.Identity.Service.Core.Test/Microsoft.AspNetCore.Identity.Service.Core.Test.csproj @@ -16,7 +16,7 @@ - + diff --git a/test/Microsoft.AspNetCore.Identity.Service.EntityFrameworkCore.InMemory.Test/Microsoft.AspNetCore.Identity.Service.EntityFrameworkCore.InMemory.Test.csproj b/test/Microsoft.AspNetCore.Identity.Service.EntityFrameworkCore.InMemory.Test/Microsoft.AspNetCore.Identity.Service.EntityFrameworkCore.InMemory.Test.csproj index 8bd9f282e3..d96bb31a61 100644 --- a/test/Microsoft.AspNetCore.Identity.Service.EntityFrameworkCore.InMemory.Test/Microsoft.AspNetCore.Identity.Service.EntityFrameworkCore.InMemory.Test.csproj +++ b/test/Microsoft.AspNetCore.Identity.Service.EntityFrameworkCore.InMemory.Test/Microsoft.AspNetCore.Identity.Service.EntityFrameworkCore.InMemory.Test.csproj @@ -1,4 +1,4 @@ - + @@ -26,7 +26,7 @@ - + \ No newline at end of file diff --git a/test/Microsoft.AspNetCore.Identity.Service.EntityFrameworkCore.Test/Microsoft.AspNetCore.Identity.Service.EntityFrameworkCore.Test.csproj b/test/Microsoft.AspNetCore.Identity.Service.EntityFrameworkCore.Test/Microsoft.AspNetCore.Identity.Service.EntityFrameworkCore.Test.csproj index 8d46aaba55..e6420f31f5 100644 --- a/test/Microsoft.AspNetCore.Identity.Service.EntityFrameworkCore.Test/Microsoft.AspNetCore.Identity.Service.EntityFrameworkCore.Test.csproj +++ b/test/Microsoft.AspNetCore.Identity.Service.EntityFrameworkCore.Test/Microsoft.AspNetCore.Identity.Service.EntityFrameworkCore.Test.csproj @@ -1,4 +1,4 @@ - + @@ -34,7 +34,7 @@ - + diff --git a/test/Microsoft.AspNetCore.Identity.Service.InMemory.Test/Microsoft.AspNetCore.Identity.Service.InMemory.Test.csproj b/test/Microsoft.AspNetCore.Identity.Service.InMemory.Test/Microsoft.AspNetCore.Identity.Service.InMemory.Test.csproj index 4f3223ee5c..7f114df930 100644 --- a/test/Microsoft.AspNetCore.Identity.Service.InMemory.Test/Microsoft.AspNetCore.Identity.Service.InMemory.Test.csproj +++ b/test/Microsoft.AspNetCore.Identity.Service.InMemory.Test/Microsoft.AspNetCore.Identity.Service.InMemory.Test.csproj @@ -1,4 +1,4 @@ - + @@ -24,7 +24,7 @@ - + \ No newline at end of file diff --git a/test/Microsoft.AspNetCore.Identity.Service.Test/Microsoft.AspNetCore.Identity.Service.Test.csproj b/test/Microsoft.AspNetCore.Identity.Service.Test/Microsoft.AspNetCore.Identity.Service.Test.csproj index ac584115cc..57e7e9f109 100644 --- a/test/Microsoft.AspNetCore.Identity.Service.Test/Microsoft.AspNetCore.Identity.Service.Test.csproj +++ b/test/Microsoft.AspNetCore.Identity.Service.Test/Microsoft.AspNetCore.Identity.Service.Test.csproj @@ -17,7 +17,7 @@ - + diff --git a/test/Microsoft.AspNetCore.Identity.Test/Microsoft.AspNetCore.Identity.Test.csproj b/test/Microsoft.AspNetCore.Identity.Test/Microsoft.AspNetCore.Identity.Test.csproj index 4eaf823a20..9ff608fb10 100644 --- a/test/Microsoft.AspNetCore.Identity.Test/Microsoft.AspNetCore.Identity.Test.csproj +++ b/test/Microsoft.AspNetCore.Identity.Test/Microsoft.AspNetCore.Identity.Test.csproj @@ -25,7 +25,7 @@ - + diff --git a/version.props b/version.props index eba6b16756..e69e2c659c 100644 --- a/version.props +++ b/version.props @@ -2,6 +2,5 @@ 2.0.0 - rtm From 73afa0af5e27b09aeaea684731bbe7a338e21903 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Thu, 24 Aug 2017 14:21:09 -0700 Subject: [PATCH 03/16] [2.0.1] Allow use of base identity pocos (#1385) --- .../IdentityEntityFrameworkBuilderExtensions.cs | 9 +++++---- .../Properties/Resources.Designer.cs | 8 ++++---- .../Resources.resx | 4 ++-- .../DefaultPocoTest.cs | 3 --- .../SqlStoreTestBase.cs | 2 +- .../UserStoreGuidKeyTest.cs | 9 +++++++++ .../UserStoreIntKeyTest.cs | 9 +++++++++ .../UserStoreStringKeyTest.cs | 8 ++++++++ 8 files changed, 38 insertions(+), 14 deletions(-) diff --git a/src/Microsoft.AspNetCore.Identity.EntityFrameworkCore/IdentityEntityFrameworkBuilderExtensions.cs b/src/Microsoft.AspNetCore.Identity.EntityFrameworkCore/IdentityEntityFrameworkBuilderExtensions.cs index 23933d9d57..a46fab5320 100644 --- a/src/Microsoft.AspNetCore.Identity.EntityFrameworkCore/IdentityEntityFrameworkBuilderExtensions.cs +++ b/src/Microsoft.AspNetCore.Identity.EntityFrameworkCore/IdentityEntityFrameworkBuilderExtensions.cs @@ -96,15 +96,16 @@ namespace Microsoft.Extensions.DependencyInjection private static TypeInfo FindGenericBaseType(Type currentType, Type genericBaseType) { - var type = currentType.GetTypeInfo(); - while (type.BaseType != null) + var type = currentType; + while (type != null) { - type = type.BaseType.GetTypeInfo(); + var typeInfo = type.GetTypeInfo(); var genericType = type.IsGenericType ? type.GetGenericTypeDefinition() : null; if (genericType != null && genericType == genericBaseType) { - return type; + return typeInfo; } + type = type.BaseType; } return null; } diff --git a/src/Microsoft.AspNetCore.Identity.EntityFrameworkCore/Properties/Resources.Designer.cs b/src/Microsoft.AspNetCore.Identity.EntityFrameworkCore/Properties/Resources.Designer.cs index 6e9c08a032..7db34e9f37 100644 --- a/src/Microsoft.AspNetCore.Identity.EntityFrameworkCore/Properties/Resources.Designer.cs +++ b/src/Microsoft.AspNetCore.Identity.EntityFrameworkCore/Properties/Resources.Designer.cs @@ -11,7 +11,7 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore = new ResourceManager("Microsoft.AspNetCore.Identity.EntityFrameworkCore.Resources", typeof(Resources).GetTypeInfo().Assembly); /// - /// AddEntityFrameworkStores can only be called with a role that derives from IdentityRole<TKey, TUserRole, TRoleClaim>. + /// AddEntityFrameworkStores can only be called with a role that derives from IdentityRole<TKey>. /// internal static string NotIdentityRole { @@ -19,13 +19,13 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore } /// - /// AddEntityFrameworkStores can only be called with a role that derives from IdentityRole<TKey, TUserRole, TRoleClaim>. + /// AddEntityFrameworkStores can only be called with a role that derives from IdentityRole<TKey>. /// internal static string FormatNotIdentityRole() => GetString("NotIdentityRole"); /// - /// AddEntityFrameworkStores can only be called with a user that derives from IdentityUser<TKey, TUserClaim, TUserRole, TUserLogin, TUserToken>. + /// AddEntityFrameworkStores can only be called with a user that derives from IdentityUser<TKey>. /// internal static string NotIdentityUser { @@ -33,7 +33,7 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore } /// - /// AddEntityFrameworkStores can only be called with a user that derives from IdentityUser<TKey, TUserClaim, TUserRole, TUserLogin, TUserToken>. + /// AddEntityFrameworkStores can only be called with a user that derives from IdentityUser<TKey>. /// internal static string FormatNotIdentityUser() => GetString("NotIdentityUser"); diff --git a/src/Microsoft.AspNetCore.Identity.EntityFrameworkCore/Resources.resx b/src/Microsoft.AspNetCore.Identity.EntityFrameworkCore/Resources.resx index eb19639109..9bde296e06 100644 --- a/src/Microsoft.AspNetCore.Identity.EntityFrameworkCore/Resources.resx +++ b/src/Microsoft.AspNetCore.Identity.EntityFrameworkCore/Resources.resx @@ -118,11 +118,11 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - AddEntityFrameworkStores can only be called with a role that derives from IdentityRole<TKey, TUserRole, TRoleClaim>. + AddEntityFrameworkStores can only be called with a role that derives from IdentityRole<TKey>. error when the role does not derive from IdentityRole - AddEntityFrameworkStores can only be called with a user that derives from IdentityUser<TKey, TUserClaim, TUserRole, TUserLogin, TUserToken>. + AddEntityFrameworkStores can only be called with a user that derives from IdentityUser<TKey>. error when the user does not derive from IdentityUser diff --git a/test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test/DefaultPocoTest.cs b/test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test/DefaultPocoTest.cs index 4a3d13feed..e845e0395a 100644 --- a/test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test/DefaultPocoTest.cs +++ b/test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test/DefaultPocoTest.cs @@ -1,9 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using System; -using System.Linq; -using System.Security.Claims; using System.Threading.Tasks; using Microsoft.AspNetCore.Builder.Internal; using Microsoft.AspNetCore.Identity.Test; diff --git a/test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test/SqlStoreTestBase.cs b/test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test/SqlStoreTestBase.cs index 9a5b3edabc..515f62a608 100644 --- a/test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test/SqlStoreTestBase.cs +++ b/test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test/SqlStoreTestBase.cs @@ -35,7 +35,7 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test protected override void SetupIdentityServices(IServiceCollection services, object context) { services.AddSingleton(); - services.AddSingleton((TestDbContext)context); + services.AddSingleton((TestDbContext)context); services.AddLogging(); services.AddSingleton>>(new TestLogger>()); services.AddSingleton>>(new TestLogger>()); diff --git a/test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test/UserStoreGuidKeyTest.cs b/test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test/UserStoreGuidKeyTest.cs index 9887736d89..de8785fdc0 100644 --- a/test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test/UserStoreGuidKeyTest.cs +++ b/test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test/UserStoreGuidKeyTest.cs @@ -59,5 +59,14 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test // This used to throw var builder = services.AddIdentity().AddEntityFrameworkStores(); } + + [Fact] + public void AddEntityFrameworkStoresCanInferKeyWithGenericBase() + { + var services = new ServiceCollection(); + // This used to throw + var builder = services.AddIdentity, IdentityRole>().AddEntityFrameworkStores(); + } + } } \ No newline at end of file diff --git a/test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test/UserStoreIntKeyTest.cs b/test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test/UserStoreIntKeyTest.cs index 265a467b93..6a32ef04a5 100644 --- a/test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test/UserStoreIntKeyTest.cs +++ b/test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test/UserStoreIntKeyTest.cs @@ -37,5 +37,14 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test // This used to throw var builder = services.AddIdentity().AddEntityFrameworkStores(); } + + [Fact] + public void AddEntityFrameworkStoresCanInferKeyWithGenericBase() + { + var services = new ServiceCollection(); + // This used to throw + var builder = services.AddIdentity, IdentityRole>().AddEntityFrameworkStores(); + } + } } \ No newline at end of file diff --git a/test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test/UserStoreStringKeyTest.cs b/test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test/UserStoreStringKeyTest.cs index d5ec26951d..499211381b 100644 --- a/test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test/UserStoreStringKeyTest.cs +++ b/test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test/UserStoreStringKeyTest.cs @@ -39,5 +39,13 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test var builder = services.AddIdentity().AddEntityFrameworkStores(); } + [Fact] + public void AddEntityFrameworkStoresCanInferKeyWithGenericBase() + { + var services = new ServiceCollection(); + // This used to throw + var builder = services.AddIdentity, IdentityRole>().AddEntityFrameworkStores(); + } + } } \ No newline at end of file From 37605799d5088fa1de4d2d1878f57cce7135c475 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Mon, 18 Sep 2017 12:41:28 -0700 Subject: [PATCH 04/16] Update version.props, dependencies, and package feeds for 2.0.1 (#1431) --- .gitignore | 2 + Directory.Build.targets | 4 ++ NuGet.config | 1 + build/common.props | 1 - build/dependencies.targets | 51 +++++++++++++++++++ ...ft.AspNet.Identity.AspNetCoreCompat.csproj | 2 +- version.props | 8 ++- 7 files changed, 65 insertions(+), 4 deletions(-) create mode 100644 Directory.Build.targets create mode 100644 build/dependencies.targets diff --git a/.gitignore b/.gitignore index ec975e873c..d8cc8fd373 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,5 @@ project.lock.json .build/ .testPublish/ global.json +*.g.targets +korebuild-lock.txt diff --git a/Directory.Build.targets b/Directory.Build.targets new file mode 100644 index 0000000000..d8f1db62cd --- /dev/null +++ b/Directory.Build.targets @@ -0,0 +1,4 @@ + + + + diff --git a/NuGet.config b/NuGet.config index 6a62aeda63..21510b3a41 100644 --- a/NuGet.config +++ b/NuGet.config @@ -2,6 +2,7 @@ + diff --git a/build/common.props b/build/common.props index bb099ebbbd..d1c1cd910f 100644 --- a/build/common.props +++ b/build/common.props @@ -9,7 +9,6 @@ $(MSBuildThisFileDirectory)Key.snk true true - $(VersionSuffix)-$(BuildNumber) true diff --git a/build/dependencies.targets b/build/dependencies.targets new file mode 100644 index 0000000000..f757893cef --- /dev/null +++ b/build/dependencies.targets @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Microsoft.AspNet.Identity.AspNetCoreCompat/Microsoft.AspNet.Identity.AspNetCoreCompat.csproj b/src/Microsoft.AspNet.Identity.AspNetCoreCompat/Microsoft.AspNet.Identity.AspNetCoreCompat.csproj index 21d49af6fd..8c4bf0c48a 100644 --- a/src/Microsoft.AspNet.Identity.AspNetCoreCompat/Microsoft.AspNet.Identity.AspNetCoreCompat.csproj +++ b/src/Microsoft.AspNet.Identity.AspNetCoreCompat/Microsoft.AspNet.Identity.AspNetCoreCompat.csproj @@ -4,7 +4,7 @@ A compatibility layer for sharing identity databases between Microsoft.AspNet.Identity.EntityFramework and Microsoft.AspNetCore.Identity.EntityFrameworkCore. - 0.3.0 + $(ExperimentalProjectVersionPrefix) net461 $(NoWarn);CS1591 true diff --git a/version.props b/version.props index e69e2c659c..3e4b5d6f6d 100644 --- a/version.props +++ b/version.props @@ -1,6 +1,10 @@ - - 2.0.0 + 2.0.1 + 0.3.1 + rtm + $(VersionPrefix) + $(VersionPrefix)-$(VersionSuffix)-final + $(VersionSuffix)-$(BuildNumber) From d1c5f8d78cfa189533d728227b11e6494c0b1680 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Wed, 23 Aug 2017 13:04:43 -0700 Subject: [PATCH 05/16] Fix regression with ChangePhoneNumber tokens --- .../UserManagerSpecificationTests.cs | 22 ++++++++++++++-- .../UserManager.cs | 25 ++++++++++++------- 2 files changed, 36 insertions(+), 11 deletions(-) diff --git a/src/Microsoft.AspNetCore.Identity.Specification.Tests/UserManagerSpecificationTests.cs b/src/Microsoft.AspNetCore.Identity.Specification.Tests/UserManagerSpecificationTests.cs index df5dae884c..7bf7f81aa8 100644 --- a/src/Microsoft.AspNetCore.Identity.Specification.Tests/UserManagerSpecificationTests.cs +++ b/src/Microsoft.AspNetCore.Identity.Specification.Tests/UserManagerSpecificationTests.cs @@ -1532,6 +1532,24 @@ namespace Microsoft.AspNetCore.Identity.Test Assert.NotEqual(stamp, await manager.GetSecurityStampAsync(user)); } + /// + /// Test. + /// + /// Task + [Fact] + public async Task ChangePhoneNumberTokenIsInt() + { + if (ShouldSkipDbTests()) + { + return; + } + var manager = CreateManager(); + var user = CreateTestUser(phoneNumber: "123-456-7890"); + IdentityResultAssert.IsSuccess(await manager.CreateAsync(user)); + var token1 = await manager.GenerateChangePhoneNumberTokenAsync(user, "111-111-1111"); + Assert.True(int.TryParse(token1, out var ignored)); + } + /// /// Test. /// @@ -1550,7 +1568,7 @@ namespace Microsoft.AspNetCore.Identity.Test var stamp = await manager.GetSecurityStampAsync(user); IdentityResultAssert.IsFailure(await manager.ChangePhoneNumberAsync(user, "111-111-1111", "bogus"), "Invalid token."); - IdentityResultAssert.VerifyLogMessage(manager.Logger, $"VerifyUserTokenAsync() failed with purpose: ChangePhoneNumber:111-111-1111 for user { await manager.GetUserIdAsync(user)}."); + IdentityResultAssert.VerifyLogMessage(manager.Logger, $"VerifyChangePhoneNumberTokenAsync() failed for user { await manager.GetUserIdAsync(user)}."); Assert.False(await manager.IsPhoneNumberConfirmedAsync(user)); Assert.Equal("123-456-7890", await manager.GetPhoneNumberAsync(user)); Assert.Equal(stamp, await manager.GetSecurityStampAsync(user)); @@ -1605,7 +1623,7 @@ namespace Microsoft.AspNetCore.Identity.Test Assert.True(await manager.VerifyChangePhoneNumberTokenAsync(user, token2, num2)); Assert.False(await manager.VerifyChangePhoneNumberTokenAsync(user, token2, num1)); Assert.False(await manager.VerifyChangePhoneNumberTokenAsync(user, token1, num2)); - IdentityResultAssert.VerifyLogMessage(manager.Logger, $"VerifyUserTokenAsync() failed with purpose: ChangePhoneNumber:111-123-4567 for user {await manager.GetUserIdAsync(user)}."); + IdentityResultAssert.VerifyLogMessage(manager.Logger, $"VerifyChangePhoneNumberTokenAsync() failed for user {await manager.GetUserIdAsync(user)}."); } /// diff --git a/src/Microsoft.Extensions.Identity.Core/UserManager.cs b/src/Microsoft.Extensions.Identity.Core/UserManager.cs index 8ced663058..819b93bba0 100644 --- a/src/Microsoft.Extensions.Identity.Core/UserManager.cs +++ b/src/Microsoft.Extensions.Identity.Core/UserManager.cs @@ -1580,10 +1580,12 @@ namespace Microsoft.AspNetCore.Identity /// /// The that represents the asynchronous operation, containing the telephone change number token. /// - public virtual Task GenerateChangePhoneNumberTokenAsync(TUser user, string phoneNumber) + public virtual async Task GenerateChangePhoneNumberTokenAsync(TUser user, string phoneNumber) { ThrowIfDisposed(); - return GenerateUserTokenAsync(user, Options.Tokens.ChangePhoneNumberTokenProvider, ChangePhoneNumberTokenPurpose + ":" + phoneNumber); + return Rfc6238AuthenticationService.GenerateCode( + await CreateSecurityTokenAsync(user), phoneNumber) + .ToString(CultureInfo.InvariantCulture); } /// @@ -1597,16 +1599,21 @@ namespace Microsoft.AspNetCore.Identity /// The that represents the asynchronous operation, returning true if the /// is valid, otherwise false. /// - public virtual Task VerifyChangePhoneNumberTokenAsync(TUser user, string token, string phoneNumber) + public virtual async Task VerifyChangePhoneNumberTokenAsync(TUser user, string token, string phoneNumber) { ThrowIfDisposed(); - if (user == null) - { - throw new ArgumentNullException(nameof(user)); - } - // Make sure the token is valid and the stamp matches - return VerifyUserTokenAsync(user, Options.Tokens.ChangePhoneNumberTokenProvider, ChangePhoneNumberTokenPurpose+":"+ phoneNumber, token); + var securityToken = await CreateSecurityTokenAsync(user); + int code; + if (securityToken != null && Int32.TryParse(token, out code)) + { + if (Rfc6238AuthenticationService.ValidateCode(securityToken, code, phoneNumber)) + { + return true; + } + } + Logger.LogWarning(8, "VerifyChangePhoneNumberTokenAsync() failed for user {userId}.", await GetUserIdAsync(user)); + return false; } /// From f9fa765fe835ff8bf3a5565fc5c8a270d79bb08a Mon Sep 17 00:00:00 2001 From: Ryan Brandenburg Date: Tue, 19 Sep 2017 13:37:42 -0700 Subject: [PATCH 06/16] Update bootstrappers --- build.cmd | 2 +- build.ps1 | 223 +++++++++++++++++++++++++++++++++++++------------ build.sh | 244 +++++++++++++++++++++++++++++++++++++++++++++--------- 3 files changed, 379 insertions(+), 90 deletions(-) diff --git a/build.cmd b/build.cmd index 7d4894cb4a..b6c8d24864 100644 --- a/build.cmd +++ b/build.cmd @@ -1,2 +1,2 @@ @ECHO OFF -PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%~dp0build.ps1' %*; exit $LASTEXITCODE" \ No newline at end of file +PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%~dp0build.ps1' %*; exit $LASTEXITCODE" diff --git a/build.ps1 b/build.ps1 index 1785334385..b7081bc1c2 100644 --- a/build.ps1 +++ b/build.ps1 @@ -1,67 +1,186 @@ -$ErrorActionPreference = "Stop" +#!/usr/bin/env powershell +#requires -version 4 -function DownloadWithRetry([string] $url, [string] $downloadLocation, [int] $retries) +<# +.SYNOPSIS +Build this repository + +.DESCRIPTION +Downloads korebuild if required. Then builds the repository. + +.PARAMETER Path +The folder to build. Defaults to the folder containing this script. + +.PARAMETER Channel +The channel of KoreBuild to download. Overrides the value from the config file. + +.PARAMETER DotNetHome +The directory where .NET Core tools will be stored. + +.PARAMETER ToolsSource +The base url where build tools can be downloaded. Overrides the value from the config file. + +.PARAMETER Update +Updates KoreBuild to the latest version even if a lock file is present. + +.PARAMETER ConfigFile +The path to the configuration file that stores values. Defaults to version.props. + +.PARAMETER MSBuildArgs +Arguments to be passed to MSBuild + +.NOTES +This function will create a file $PSScriptRoot/korebuild-lock.txt. This lock file can be committed to source, but does not have to be. +When the lockfile is not present, KoreBuild will create one using latest available version from $Channel. + +The $ConfigFile is expected to be an JSON file. It is optional, and the configuration values in it are optional as well. Any options set +in the file are overridden by command line parameters. + +.EXAMPLE +Example config file: +```json { - while($true) - { - try - { - Invoke-WebRequest $url -OutFile $downloadLocation - break - } - catch - { - $exceptionMessage = $_.Exception.Message - Write-Host "Failed to download '$url': $exceptionMessage" - if ($retries -gt 0) { - $retries-- - Write-Host "Waiting 10 seconds before retrying. Retries left: $retries" - Start-Sleep -Seconds 10 + "$schema": "https://raw.githubusercontent.com/aspnet/BuildTools/dev/tools/korebuild.schema.json", + "channel": "dev", + "toolsSource": "https://aspnetcore.blob.core.windows.net/buildtools" +} +``` +#> +[CmdletBinding(PositionalBinding = $false)] +param( + [string]$Path = $PSScriptRoot, + [Alias('c')] + [string]$Channel, + [Alias('d')] + [string]$DotNetHome, + [Alias('s')] + [string]$ToolsSource, + [Alias('u')] + [switch]$Update, + [string]$ConfigFile = $null, + [Parameter(ValueFromRemainingArguments = $true)] + [string[]]$MSBuildArgs +) +Set-StrictMode -Version 2 +$ErrorActionPreference = 'Stop' + +# +# Functions +# + +function Get-KoreBuild { + + $lockFile = Join-Path $Path 'korebuild-lock.txt' + + if (!(Test-Path $lockFile) -or $Update) { + Get-RemoteFile "$ToolsSource/korebuild/channels/$Channel/latest.txt" $lockFile + } + + $version = Get-Content $lockFile | Where-Object { $_ -like 'version:*' } | Select-Object -first 1 + if (!$version) { + Write-Error "Failed to parse version from $lockFile. Expected a line that begins with 'version:'" + } + $version = $version.TrimStart('version:').Trim() + $korebuildPath = Join-Paths $DotNetHome ('buildtools', 'korebuild', $version) + + if (!(Test-Path $korebuildPath)) { + Write-Host -ForegroundColor Magenta "Downloading KoreBuild $version" + New-Item -ItemType Directory -Path $korebuildPath | Out-Null + $remotePath = "$ToolsSource/korebuild/artifacts/$version/korebuild.$version.zip" + + try { + $tmpfile = Join-Path ([IO.Path]::GetTempPath()) "KoreBuild-$([guid]::NewGuid()).zip" + Get-RemoteFile $remotePath $tmpfile + if (Get-Command -Name 'Expand-Archive' -ErrorAction Ignore) { + # Use built-in commands where possible as they are cross-plat compatible + Expand-Archive -Path $tmpfile -DestinationPath $korebuildPath } - else - { - $exception = $_.Exception - throw $exception + else { + # Fallback to old approach for old installations of PowerShell + Add-Type -AssemblyName System.IO.Compression.FileSystem + [System.IO.Compression.ZipFile]::ExtractToDirectory($tmpfile, $korebuildPath) } } + catch { + remove-item -Recurse -Force $korebuildPath -ErrorAction Ignore + throw + } + finally { + remove-item $tmpfile -ErrorAction Ignore + } + } + + return $korebuildPath +} + +function Join-Paths([string]$path, [string[]]$childPaths) { + $childPaths | ForEach-Object { $path = Join-Path $path $_ } + return $path +} + +function Get-RemoteFile([string]$RemotePath, [string]$LocalPath) { + if ($RemotePath -notlike 'http*') { + Copy-Item $RemotePath $LocalPath + return + } + + $retries = 10 + while ($retries -gt 0) { + $retries -= 1 + try { + Invoke-WebRequest -UseBasicParsing -Uri $RemotePath -OutFile $LocalPath + return + } + catch { + Write-Verbose "Request failed. $retries retries remaining" + } + } + + Write-Error "Download failed: '$RemotePath'." +} + +# +# Main +# + +# Load configuration or set defaults + +$Path = Resolve-Path $Path +if (!$ConfigFile) { $ConfigFile = Join-Path $Path 'korebuild.json' } + +if (Test-Path $ConfigFile) { + try { + $config = Get-Content -Raw -Encoding UTF8 -Path $ConfigFile | ConvertFrom-Json + if ($config) { + if (!($Channel) -and (Get-Member -Name 'channel' -InputObject $config)) { [string] $Channel = $config.channel } + if (!($ToolsSource) -and (Get-Member -Name 'toolsSource' -InputObject $config)) { [string] $ToolsSource = $config.toolsSource} + } + } catch { + Write-Warning "$ConfigFile could not be read. Its settings will be ignored." + Write-Warning $Error[0] } } -cd $PSScriptRoot - -$repoFolder = $PSScriptRoot -$env:REPO_FOLDER = $repoFolder - -$koreBuildZip="https://github.com/aspnet/KoreBuild/archive/rel/2.0.0.zip" -if ($env:KOREBUILD_ZIP) -{ - $koreBuildZip=$env:KOREBUILD_ZIP +if (!$DotNetHome) { + $DotNetHome = if ($env:DOTNET_HOME) { $env:DOTNET_HOME } ` + elseif ($env:USERPROFILE) { Join-Path $env:USERPROFILE '.dotnet'} ` + elseif ($env:HOME) {Join-Path $env:HOME '.dotnet'}` + else { Join-Path $PSScriptRoot '.dotnet'} } -$buildFolder = ".build" -$buildFile="$buildFolder\KoreBuild.ps1" +if (!$Channel) { $Channel = 'dev' } +if (!$ToolsSource) { $ToolsSource = 'https://aspnetcore.blob.core.windows.net/buildtools' } -if (!(Test-Path $buildFolder)) { - Write-Host "Downloading KoreBuild from $koreBuildZip" +# Execute - $tempFolder=$env:TEMP + "\KoreBuild-" + [guid]::NewGuid() - New-Item -Path "$tempFolder" -Type directory | Out-Null +$korebuildPath = Get-KoreBuild +Import-Module -Force -Scope Local (Join-Path $korebuildPath 'KoreBuild.psd1') - $localZipFile="$tempFolder\korebuild.zip" - - DownloadWithRetry -url $koreBuildZip -downloadLocation $localZipFile -retries 6 - - Add-Type -AssemblyName System.IO.Compression.FileSystem - [System.IO.Compression.ZipFile]::ExtractToDirectory($localZipFile, $tempFolder) - - New-Item -Path "$buildFolder" -Type directory | Out-Null - copy-item "$tempFolder\**\build\*" $buildFolder -Recurse - - # Cleanup - if (Test-Path $tempFolder) { - Remove-Item -Recurse -Force $tempFolder - } +try { + Install-Tools $ToolsSource $DotNetHome + Invoke-RepositoryBuild $Path @MSBuildArgs +} +finally { + Remove-Module 'KoreBuild' -ErrorAction Ignore } - -&"$buildFile" @args diff --git a/build.sh b/build.sh index 5e27ed8efb..9e32358cf3 100755 --- a/build.sh +++ b/build.sh @@ -1,46 +1,216 @@ #!/usr/bin/env bash -repoFolder="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -cd $repoFolder -koreBuildZip="https://github.com/aspnet/KoreBuild/archive/rel/2.0.0.zip" -if [ ! -z $KOREBUILD_ZIP ]; then - koreBuildZip=$KOREBUILD_ZIP -fi +set -euo pipefail -buildFolder=".build" -buildFile="$buildFolder/KoreBuild.sh" +# +# variables +# -if test ! -d $buildFolder; then - echo "Downloading KoreBuild from $koreBuildZip" +RESET="\033[0m" +RED="\033[0;31m" +YELLOW="\033[0;33m" +MAGENTA="\033[0;95m" +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +[ -z "${DOTNET_HOME:-}"] && DOTNET_HOME="$HOME/.dotnet" +config_file="$DIR/korebuild.json" +verbose=false +update=false +repo_path="$DIR" +channel='' +tools_source='' - tempFolder="/tmp/KoreBuild-$(uuidgen)" - mkdir $tempFolder +# +# Functions +# +__usage() { + echo "Usage: $(basename ${BASH_SOURCE[0]}) [options] [[--] ...]" + echo "" + echo "Arguments:" + echo " ... Arguments passed to MSBuild. Variable number of arguments allowed." + echo "" + echo "Options:" + echo " --verbose Show verbose output." + echo " -c|--channel The channel of KoreBuild to download. Overrides the value from the config file.." + echo " --config-file The path to the configuration file that stores values. Defaults to korebuild.json." + echo " -d|--dotnet-home The directory where .NET Core tools will be stored. Defaults to '\$DOTNET_HOME' or '\$HOME/.dotnet." + echo " --path The directory to build. Defaults to the directory containing the script." + echo " -s|--tools-source The base url where build tools can be downloaded. Overrides the value from the config file." + echo " -u|--update Update to the latest KoreBuild even if the lock file is present." + echo "" + echo "Description:" + echo " This function will create a file \$DIR/korebuild-lock.txt. This lock file can be committed to source, but does not have to be." + echo " When the lockfile is not present, KoreBuild will create one using latest available version from \$channel." - localZipFile="$tempFolder/korebuild.zip" - - retries=6 - until (wget -O $localZipFile $koreBuildZip 2>/dev/null || curl -o $localZipFile --location $koreBuildZip 2>/dev/null) - do - echo "Failed to download '$koreBuildZip'" - if [ "$retries" -le 0 ]; then - exit 1 - fi - retries=$((retries - 1)) - echo "Waiting 10 seconds before retrying. Retries left: $retries" - sleep 10s - done - - unzip -q -d $tempFolder $localZipFile - - mkdir $buildFolder - cp -r $tempFolder/**/build/** $buildFolder - - chmod +x $buildFile - - # Cleanup - if test -d $tempFolder; then - rm -rf $tempFolder + if [[ "${1:-}" != '--no-exit' ]]; then + exit 2 fi +} + +get_korebuild() { + local lock_file="$repo_path/korebuild-lock.txt" + if [ ! -f $lock_file ] || [ "$update" = true ]; then + __get_remote_file "$tools_source/korebuild/channels/$channel/latest.txt" $lock_file + fi + local version="$(grep 'version:*' -m 1 $lock_file)" + if [[ "$version" == '' ]]; then + __error "Failed to parse version from $lock_file. Expected a line that begins with 'version:'" + return 1 + fi + version="$(echo ${version#version:} | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')" + local korebuild_path="$DOTNET_HOME/buildtools/korebuild/$version" + + { + if [ ! -d "$korebuild_path" ]; then + mkdir -p "$korebuild_path" + local remote_path="$tools_source/korebuild/artifacts/$version/korebuild.$version.zip" + tmpfile="$(mktemp)" + echo -e "${MAGENTA}Downloading KoreBuild ${version}${RESET}" + if __get_remote_file $remote_path $tmpfile; then + unzip -q -d "$korebuild_path" $tmpfile + fi + rm $tmpfile || true + fi + + source "$korebuild_path/KoreBuild.sh" + } || { + if [ -d "$korebuild_path" ]; then + echo "Cleaning up after failed installation" + rm -rf "$korebuild_path" || true + fi + return 1 + } +} + +__error() { + echo -e "${RED}error: $*${RESET}" 1>&2 +} + +__warn() { + echo -e "${YELLOW}warning: $*${RESET}" +} + +__machine_has() { + hash "$1" > /dev/null 2>&1 + return $? +} + +__get_remote_file() { + local remote_path=$1 + local local_path=$2 + + if [[ "$remote_path" != 'http'* ]]; then + cp $remote_path $local_path + return 0 + fi + + failed=false + if __machine_has curl ; then + curl --retry 10 -sSL -f --create-dirs -o $local_path $remote_path || failed=true + elif __machine_has wget; then + wget --tries 10 -O $local_path $remote_path || failed=true + else + failed=true + fi + + if [ "$failed" = true ]; then + __error "Download failed: $remote_path" 1>&2 + return 1 + fi +} + +# +# main +# + +while [[ $# > 0 ]]; do + case $1 in + -\?|-h|--help) + __usage --no-exit + exit 0 + ;; + -c|--channel|-Channel) + shift + channel=${1:-} + [ -z "$channel" ] && __usage + ;; + --config-file|-ConfigFile) + shift + config_file="${1:-}" + [ -z "$config_file" ] && __usage + if [ ! -f "$config_file" ]; then + __error "Invalid value for --config-file. $config_file does not exist." + exit 1 + fi + ;; + -d|--dotnet-home|-DotNetHome) + shift + DOTNET_HOME=${1:-} + [ -z "$DOTNET_HOME" ] && __usage + ;; + --path|-Path) + shift + repo_path="${1:-}" + [ -z "$repo_path" ] && __usage + ;; + -s|--tools-source|-ToolsSource) + shift + tools_source="${1:-}" + [ -z "$tools_source" ] && __usage + ;; + -u|--update|-Update) + update=true + ;; + --verbose|-Verbose) + verbose=true + ;; + --) + shift + break + ;; + *) + break + ;; + esac + shift +done + +if ! __machine_has unzip; then + __error 'Missing required command: unzip' + exit 1 fi -$buildFile -r $repoFolder "$@" +if ! __machine_has curl && ! __machine_has wget; then + __error 'Missing required command. Either wget or curl is required.' + exit 1 +fi + +[ -z "${config_file:-}" ] && config_file="$repo_path/korebuild.json" +if [ -f "$config_file" ]; then + if __machine_has jq ; then + if jq '.' "$config_file" >/dev/null ; then + config_channel="$(jq -r 'select(.channel!=null) | .channel' "$config_file")" + config_tools_source="$(jq -r 'select(.toolsSource!=null) | .toolsSource' "$config_file")" + else + __warn "$config_file is invalid JSON. Its settings will be ignored." + fi + elif __machine_has python ; then + if python -c "import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'))" >/dev/null ; then + config_channel="$(python -c "import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'));print(obj['channel'] if 'channel' in obj else '')")" + config_tools_source="$(python -c "import json,codecs;obj=json.load(codecs.open('$config_file', 'r', 'utf-8-sig'));print(obj['toolsSource'] if 'toolsSource' in obj else '')")" + else + __warn "$config_file is invalid JSON. Its settings will be ignored." + fi + else + __warn 'Missing required command: jq or pyton. Could not parse the JSON file. Its settings will be ignored.' + fi + + [ ! -z "${config_channel:-}" ] && channel="$config_channel" + [ ! -z "${config_tools_source:-}" ] && tools_source="$config_tools_source" +fi + +[ -z "$channel" ] && channel='dev' +[ -z "$tools_source" ] && tools_source='https://aspnetcore.blob.core.windows.net/buildtools' + +get_korebuild +install_tools "$tools_source" "$DOTNET_HOME" +invoke_repository_build "$repo_path" $@ From 89b55679f2dc322f9ffb68a9c2446e72924e906b Mon Sep 17 00:00:00 2001 From: Ryan Brandenburg Date: Tue, 19 Sep 2017 13:53:04 -0700 Subject: [PATCH 07/16] Update bootstrappers --- korebuild.json | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 korebuild.json diff --git a/korebuild.json b/korebuild.json new file mode 100644 index 0000000000..6bbc5eeb9c --- /dev/null +++ b/korebuild.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://raw.githubusercontent.com/aspnet/BuildTools/rel/2.0.2/tools/korebuild.schema.json", + "channel": "rel/2.0.2" +} From e7795368111fb3518173e93c47c4047a34042394 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Wed, 20 Sep 2017 13:39:56 -0700 Subject: [PATCH 08/16] Update the list of packages patching in 2.0.x --- build/dependencies.targets | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/build/dependencies.targets b/build/dependencies.targets index f757893cef..6db4e7e1ea 100644 --- a/build/dependencies.targets +++ b/build/dependencies.targets @@ -1,7 +1,21 @@  + + + + + + + + + + + + + + @@ -38,6 +52,7 @@ + From 74f6605cc4948346af0e898a5f9b77ec18191b78 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Wed, 20 Sep 2017 17:23:13 -0700 Subject: [PATCH 09/16] Update build scripts, tools, and dependencies for 2.0.x --- build.sh | 40 ++++++++++++---------- build/dependencies.targets | 69 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 91 insertions(+), 18 deletions(-) diff --git a/build.sh b/build.sh index 9e32358cf3..5138fc4f22 100755 --- a/build.sh +++ b/build.sh @@ -23,7 +23,7 @@ tools_source='' # Functions # __usage() { - echo "Usage: $(basename ${BASH_SOURCE[0]}) [options] [[--] ...]" + echo "Usage: $(basename "${BASH_SOURCE[0]}") [options] [[--] ...]" echo "" echo "Arguments:" echo " ... Arguments passed to MSBuild. Variable number of arguments allowed." @@ -47,16 +47,17 @@ __usage() { } get_korebuild() { + local version local lock_file="$repo_path/korebuild-lock.txt" - if [ ! -f $lock_file ] || [ "$update" = true ]; then - __get_remote_file "$tools_source/korebuild/channels/$channel/latest.txt" $lock_file + if [ ! -f "$lock_file" ] || [ "$update" = true ]; then + __get_remote_file "$tools_source/korebuild/channels/$channel/latest.txt" "$lock_file" fi - local version="$(grep 'version:*' -m 1 $lock_file)" + version="$(grep 'version:*' -m 1 "$lock_file")" if [[ "$version" == '' ]]; then __error "Failed to parse version from $lock_file. Expected a line that begins with 'version:'" return 1 fi - version="$(echo ${version#version:} | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')" + version="$(echo "${version#version:}" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')" local korebuild_path="$DOTNET_HOME/buildtools/korebuild/$version" { @@ -65,10 +66,10 @@ get_korebuild() { local remote_path="$tools_source/korebuild/artifacts/$version/korebuild.$version.zip" tmpfile="$(mktemp)" echo -e "${MAGENTA}Downloading KoreBuild ${version}${RESET}" - if __get_remote_file $remote_path $tmpfile; then - unzip -q -d "$korebuild_path" $tmpfile + if __get_remote_file "$remote_path" "$tmpfile"; then + unzip -q -d "$korebuild_path" "$tmpfile" fi - rm $tmpfile || true + rm "$tmpfile" || true fi source "$korebuild_path/KoreBuild.sh" @@ -99,19 +100,22 @@ __get_remote_file() { local local_path=$2 if [[ "$remote_path" != 'http'* ]]; then - cp $remote_path $local_path + cp "$remote_path" "$local_path" return 0 fi - failed=false - if __machine_has curl ; then - curl --retry 10 -sSL -f --create-dirs -o $local_path $remote_path || failed=true - elif __machine_has wget; then - wget --tries 10 -O $local_path $remote_path || failed=true + local failed=false + if __machine_has wget; then + wget --tries 10 --quiet -O "$local_path" "$remote_path" || failed=true else failed=true fi + if [ "$failed" = true ] && __machine_has curl; then + failed=false + curl --retry 10 -sSL -f --create-dirs -o "$local_path" "$remote_path" || failed=true + fi + if [ "$failed" = true ]; then __error "Download failed: $remote_path" 1>&2 return 1 @@ -122,7 +126,7 @@ __get_remote_file() { # main # -while [[ $# > 0 ]]; do +while [[ $# -gt 0 ]]; do case $1 in -\?|-h|--help) __usage --no-exit @@ -130,7 +134,7 @@ while [[ $# > 0 ]]; do ;; -c|--channel|-Channel) shift - channel=${1:-} + channel="${1:-}" [ -z "$channel" ] && __usage ;; --config-file|-ConfigFile) @@ -144,7 +148,7 @@ while [[ $# > 0 ]]; do ;; -d|--dotnet-home|-DotNetHome) shift - DOTNET_HOME=${1:-} + DOTNET_HOME="${1:-}" [ -z "$DOTNET_HOME" ] && __usage ;; --path|-Path) @@ -213,4 +217,4 @@ fi get_korebuild install_tools "$tools_source" "$DOTNET_HOME" -invoke_repository_build "$repo_path" $@ +invoke_repository_build "$repo_path" "$@" diff --git a/build/dependencies.targets b/build/dependencies.targets index 6db4e7e1ea..4c2b3ee12c 100644 --- a/build/dependencies.targets +++ b/build/dependencies.targets @@ -3,8 +3,12 @@ + + + + @@ -14,12 +18,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + @@ -31,6 +60,7 @@ + @@ -39,7 +69,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -52,7 +113,13 @@ + + + + + + @@ -62,5 +129,7 @@ + + \ No newline at end of file From c24a60c544b50ca2f3150ffbbaab5c1c8e3069e1 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Fri, 29 Sep 2017 17:01:59 -0700 Subject: [PATCH 10/16] Import dependencies.props last to ensure TargetFramework is set first --- Directory.Build.targets | 1 + build/common.props | 1 - build/dependencies.props | 2 ++ .../IdentityOIDCWebApplicationSample.csproj | 2 -- 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Directory.Build.targets b/Directory.Build.targets index d8f1db62cd..5d5f288682 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -1,4 +1,5 @@ + diff --git a/build/common.props b/build/common.props index d1c1cd910f..b396529090 100644 --- a/build/common.props +++ b/build/common.props @@ -1,5 +1,4 @@ - diff --git a/build/dependencies.props b/build/dependencies.props index a5dd6b500b..9edf701582 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -17,4 +17,6 @@ 2.3.0-beta2-build1317 2.2.0 + + diff --git a/samples/IdentityOIDCWebApplicationSample/IdentityOIDCWebApplicationSample.csproj b/samples/IdentityOIDCWebApplicationSample/IdentityOIDCWebApplicationSample.csproj index d6d78d022c..190305773a 100644 --- a/samples/IdentityOIDCWebApplicationSample/IdentityOIDCWebApplicationSample.csproj +++ b/samples/IdentityOIDCWebApplicationSample/IdentityOIDCWebApplicationSample.csproj @@ -1,7 +1,5 @@ - - netcoreapp2.0 true From 7c633d12c9e848e403108b815bc515ed8715baf7 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Mon, 2 Oct 2017 14:12:44 -0700 Subject: [PATCH 11/16] Use MSBuild to set NuGet feeds instead of NuGet.config --- Directory.Build.targets | 1 + NuGet.config | 5 +---- build/sources.props | 14 ++++++++++++++ 3 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 build/sources.props diff --git a/Directory.Build.targets b/Directory.Build.targets index 5d5f288682..7bf9e763a6 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -1,4 +1,5 @@ + diff --git a/NuGet.config b/NuGet.config index 21510b3a41..e32bddfd51 100644 --- a/NuGet.config +++ b/NuGet.config @@ -2,9 +2,6 @@ - - - - + diff --git a/build/sources.props b/build/sources.props new file mode 100644 index 0000000000..ff68f685fa --- /dev/null +++ b/build/sources.props @@ -0,0 +1,14 @@ + + + + + $(DotNetRestoreSources) + + $(RestoreSources); + https://dotnet.myget.org/F/aspnet-2-0-2-october2017-patch/api/v3/index.json; + https://dotnet.myget.org/F/aspnetcore-master/api/v3/index.json; + https://dotnet.myget.org/F/aspnetcore-tools/api/v3/index.json; + https://api.nuget.org/v3/index.json; + + + From ea707f8d8aef2a4da5691f49dc7f286e15a98409 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Mon, 9 Oct 2017 11:10:45 -0700 Subject: [PATCH 12/16] Update how PackageReference versions are set Changes: - Remove floating versions - Disable myget feeds during a Universe build - Use package-specific MSBuild variables. Pattern = `packageId.Pascalize() + "PackageVersion"`, with a few exceptions. --- Directory.Build.targets | 4 +- build/common.props | 2 +- build/dependencies.props | 74 +++++++--- build/dependencies.targets | 135 ------------------ build/sources.props | 5 +- .../IdentityOIDCWebApplicationSample.csproj | 54 +++---- .../IdentitySample.Mvc.csproj | 38 ++--- ...ft.AspNet.Identity.AspNetCoreCompat.csproj | 6 +- ...etCore.Diagnostics.Identity.Service.csproj | 8 +- ...etCore.Identity.EntityFrameworkCore.csproj | 4 +- ...tCore.Identity.Service.Abstractions.csproj | 6 +- ...Core.Identity.Service.AzureKeyVault.csproj | 10 +- ...ft.AspNetCore.Identity.Service.Core.csproj | 6 +- ...dentity.Service.IntegratedWebClient.csproj | 6 +- ...oft.AspNetCore.Identity.Service.Mvc.csproj | 2 +- ...dentity.Service.Specification.Tests.csproj | 10 +- ...crosoft.AspNetCore.Identity.Service.csproj | 2 +- ...etCore.Identity.Specification.Tests.csproj | 10 +- .../Microsoft.AspNetCore.Identity.csproj | 8 +- .../Microsoft.Extensions.Identity.Core.csproj | 8 +- ...icrosoft.Extensions.Identity.Stores.csproj | 4 +- ...y.EntityFrameworkCore.InMemory.Test.csproj | 16 +-- ...e.Identity.EntityFrameworkCore.Test.csproj | 26 ++-- ...t.AspNetCore.Identity.InMemory.Test.csproj | 16 +-- ....Identity.Service.Abstractions.Test.csproj | 12 +- ...pNetCore.Identity.Service.Core.Test.csproj | 12 +- ...e.EntityFrameworkCore.InMemory.Test.csproj | 18 +-- ...ty.Service.EntityFrameworkCore.Test.csproj | 26 ++-- ...Core.Identity.Service.InMemory.Test.csproj | 18 +-- ...ft.AspNetCore.Identity.Service.Test.csproj | 12 +- .../Microsoft.AspNetCore.Identity.Test.csproj | 18 +-- 31 files changed, 242 insertions(+), 334 deletions(-) delete mode 100644 build/dependencies.targets diff --git a/Directory.Build.targets b/Directory.Build.targets index 7bf9e763a6..246f7ac20c 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -1,6 +1,4 @@ - + - - diff --git a/build/common.props b/build/common.props index b396529090..c8e78f37a9 100644 --- a/build/common.props +++ b/build/common.props @@ -12,7 +12,7 @@ - + diff --git a/build/dependencies.props b/build/dependencies.props index 9edf701582..05ca15a928 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -1,21 +1,63 @@  - 2.0.0 - 2.3.2 - 3.14.1 - 2.1.4 - 4.4.0 - 2.2.1 - 2.0.1-rtm-15400 - 4.7.49 - 2.0.0 - 2.0.0 - 3.0.1 - 2.0.0 - 15.3.0 - 2.3.0-beta2-build3683 - 2.3.0-beta2-build1317 - 2.2.0 + 2.0.2-beta-15522 + 2.0.1-rtm-83 + 2.0.1-rtm-83 + 2.0.1-rtm-83 + 2.0.1-rtm-83 + 2.0.1-rtm-83 + 2.0.1-rtm-83 + 2.0.1-rtm-83 + 2.0.1-rtm-83 + 2.0.1-rtm-83 + 2.0.1-rtm-83 + 2.0.1-rtm-83 + 2.0.1-rtm-83 + 2.0.1-rtm-83 + 2.0.1-rtm-83 + 2.0.1-rtm-83 + 2.0.1-rtm-83 + 2.0.1-rtm-83 + 2.0.1-rtm-83 + 2.0.1-rtm-83 + 2.0.1-rtm-83 + 2.0.1-rtm-83 + 2.0.0 + 2.2.1 + 2.3.2 + 2.0.1-rtm-83 + 2.0.1-rtm-83 + 2.0.1-rtm-83 + 2.0.1-rtm-83 + 2.0.1-rtm-83 + 2.0.0 + 2.0.0 + 2.0.0 + 2.0.0 + 2.0.0 + 2.0.0 + 2.0.0 + 2.0.0 + 2.0.0 + 2.0.0 + 2.0.0 + 2.0.0 + 2.0.0 + 2.0.0 + 2.0.0 + 2.0.0 + 2.0.0 + 3.14.1 + 2.1.4 + 15.3.0 + 3.0.1 + 2.0.1-rtm-83 + 2.0.1-rtm-83 + 4.7.49 + 2.0.1-rtm-83 + 4.4.0 + 2.3.0-beta2-build3683 + 2.3.0-beta2-build1317 diff --git a/build/dependencies.targets b/build/dependencies.targets deleted file mode 100644 index 4c2b3ee12c..0000000000 --- a/build/dependencies.targets +++ /dev/null @@ -1,135 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/build/sources.props b/build/sources.props index ff68f685fa..804940f029 100644 --- a/build/sources.props +++ b/build/sources.props @@ -3,11 +3,14 @@ $(DotNetRestoreSources) - + $(RestoreSources); https://dotnet.myget.org/F/aspnet-2-0-2-october2017-patch/api/v3/index.json; https://dotnet.myget.org/F/aspnetcore-master/api/v3/index.json; https://dotnet.myget.org/F/aspnetcore-tools/api/v3/index.json; + + + $(RestoreSources); https://api.nuget.org/v3/index.json; diff --git a/samples/IdentityOIDCWebApplicationSample/IdentityOIDCWebApplicationSample.csproj b/samples/IdentityOIDCWebApplicationSample/IdentityOIDCWebApplicationSample.csproj index 190305773a..20e7c48034 100644 --- a/samples/IdentityOIDCWebApplicationSample/IdentityOIDCWebApplicationSample.csproj +++ b/samples/IdentityOIDCWebApplicationSample/IdentityOIDCWebApplicationSample.csproj @@ -1,4 +1,4 @@ - + netcoreapp2.0 @@ -7,35 +7,35 @@ - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - - + + + diff --git a/samples/IdentitySample.Mvc/IdentitySample.Mvc.csproj b/samples/IdentitySample.Mvc/IdentitySample.Mvc.csproj index f652e77396..c6ca718ec7 100644 --- a/samples/IdentitySample.Mvc/IdentitySample.Mvc.csproj +++ b/samples/IdentitySample.Mvc/IdentitySample.Mvc.csproj @@ -14,27 +14,27 @@ - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - + diff --git a/src/Microsoft.AspNet.Identity.AspNetCoreCompat/Microsoft.AspNet.Identity.AspNetCoreCompat.csproj b/src/Microsoft.AspNet.Identity.AspNetCoreCompat/Microsoft.AspNet.Identity.AspNetCoreCompat.csproj index 8c4bf0c48a..9e5d0f665e 100644 --- a/src/Microsoft.AspNet.Identity.AspNetCoreCompat/Microsoft.AspNet.Identity.AspNetCoreCompat.csproj +++ b/src/Microsoft.AspNet.Identity.AspNetCoreCompat/Microsoft.AspNet.Identity.AspNetCoreCompat.csproj @@ -12,9 +12,9 @@ - - - + + + diff --git a/src/Microsoft.AspNetCore.Diagnostics.Identity.Service/Microsoft.AspNetCore.Diagnostics.Identity.Service.csproj b/src/Microsoft.AspNetCore.Diagnostics.Identity.Service/Microsoft.AspNetCore.Diagnostics.Identity.Service.csproj index 1a94e969f5..4ce5ab55d4 100644 --- a/src/Microsoft.AspNetCore.Diagnostics.Identity.Service/Microsoft.AspNetCore.Diagnostics.Identity.Service.csproj +++ b/src/Microsoft.AspNetCore.Diagnostics.Identity.Service/Microsoft.AspNetCore.Diagnostics.Identity.Service.csproj @@ -1,4 +1,4 @@ - + @@ -11,8 +11,8 @@ - - + + @@ -23,7 +23,7 @@ - + diff --git a/src/Microsoft.AspNetCore.Identity.EntityFrameworkCore/Microsoft.AspNetCore.Identity.EntityFrameworkCore.csproj b/src/Microsoft.AspNetCore.Identity.EntityFrameworkCore/Microsoft.AspNetCore.Identity.EntityFrameworkCore.csproj index 8769c408b9..f7e5495449 100644 --- a/src/Microsoft.AspNetCore.Identity.EntityFrameworkCore/Microsoft.AspNetCore.Identity.EntityFrameworkCore.csproj +++ b/src/Microsoft.AspNetCore.Identity.EntityFrameworkCore/Microsoft.AspNetCore.Identity.EntityFrameworkCore.csproj @@ -1,4 +1,4 @@ - + @@ -15,7 +15,7 @@ - + diff --git a/src/Microsoft.AspNetCore.Identity.Service.Abstractions/Microsoft.AspNetCore.Identity.Service.Abstractions.csproj b/src/Microsoft.AspNetCore.Identity.Service.Abstractions/Microsoft.AspNetCore.Identity.Service.Abstractions.csproj index cee896d111..8a8f3f34a2 100644 --- a/src/Microsoft.AspNetCore.Identity.Service.Abstractions/Microsoft.AspNetCore.Identity.Service.Abstractions.csproj +++ b/src/Microsoft.AspNetCore.Identity.Service.Abstractions/Microsoft.AspNetCore.Identity.Service.Abstractions.csproj @@ -11,9 +11,9 @@ - - - + + + diff --git a/src/Microsoft.AspNetCore.Identity.Service.AzureKeyVault/Microsoft.AspNetCore.Identity.Service.AzureKeyVault.csproj b/src/Microsoft.AspNetCore.Identity.Service.AzureKeyVault/Microsoft.AspNetCore.Identity.Service.AzureKeyVault.csproj index 7562e6bca8..49a169a371 100644 --- a/src/Microsoft.AspNetCore.Identity.Service.AzureKeyVault/Microsoft.AspNetCore.Identity.Service.AzureKeyVault.csproj +++ b/src/Microsoft.AspNetCore.Identity.Service.AzureKeyVault/Microsoft.AspNetCore.Identity.Service.AzureKeyVault.csproj @@ -1,4 +1,4 @@ - + @@ -19,10 +19,10 @@ - - - - + + + + diff --git a/src/Microsoft.AspNetCore.Identity.Service.Core/Microsoft.AspNetCore.Identity.Service.Core.csproj b/src/Microsoft.AspNetCore.Identity.Service.Core/Microsoft.AspNetCore.Identity.Service.Core.csproj index 3ecb167d83..a2591c625c 100644 --- a/src/Microsoft.AspNetCore.Identity.Service.Core/Microsoft.AspNetCore.Identity.Service.Core.csproj +++ b/src/Microsoft.AspNetCore.Identity.Service.Core/Microsoft.AspNetCore.Identity.Service.Core.csproj @@ -15,9 +15,9 @@ - - - + + + diff --git a/src/Microsoft.AspNetCore.Identity.Service.IntegratedWebClient/Microsoft.AspNetCore.Identity.Service.IntegratedWebClient.csproj b/src/Microsoft.AspNetCore.Identity.Service.IntegratedWebClient/Microsoft.AspNetCore.Identity.Service.IntegratedWebClient.csproj index 3c3396db32..3b45d9f2f0 100644 --- a/src/Microsoft.AspNetCore.Identity.Service.IntegratedWebClient/Microsoft.AspNetCore.Identity.Service.IntegratedWebClient.csproj +++ b/src/Microsoft.AspNetCore.Identity.Service.IntegratedWebClient/Microsoft.AspNetCore.Identity.Service.IntegratedWebClient.csproj @@ -11,9 +11,9 @@ - - - + + + diff --git a/src/Microsoft.AspNetCore.Identity.Service.Mvc/Microsoft.AspNetCore.Identity.Service.Mvc.csproj b/src/Microsoft.AspNetCore.Identity.Service.Mvc/Microsoft.AspNetCore.Identity.Service.Mvc.csproj index fc0ce8e6ac..9de5d5d1c4 100644 --- a/src/Microsoft.AspNetCore.Identity.Service.Mvc/Microsoft.AspNetCore.Identity.Service.Mvc.csproj +++ b/src/Microsoft.AspNetCore.Identity.Service.Mvc/Microsoft.AspNetCore.Identity.Service.Mvc.csproj @@ -11,7 +11,7 @@ - + diff --git a/src/Microsoft.AspNetCore.Identity.Service.Specification.Tests/Microsoft.AspNetCore.Identity.Service.Specification.Tests.csproj b/src/Microsoft.AspNetCore.Identity.Service.Specification.Tests/Microsoft.AspNetCore.Identity.Service.Specification.Tests.csproj index 920a049da1..8c61875e7e 100644 --- a/src/Microsoft.AspNetCore.Identity.Service.Specification.Tests/Microsoft.AspNetCore.Identity.Service.Specification.Tests.csproj +++ b/src/Microsoft.AspNetCore.Identity.Service.Specification.Tests/Microsoft.AspNetCore.Identity.Service.Specification.Tests.csproj @@ -1,4 +1,4 @@ - + @@ -18,10 +18,10 @@ - - - - + + + + diff --git a/src/Microsoft.AspNetCore.Identity.Service/Microsoft.AspNetCore.Identity.Service.csproj b/src/Microsoft.AspNetCore.Identity.Service/Microsoft.AspNetCore.Identity.Service.csproj index 6ac3b00937..e2cd04a535 100644 --- a/src/Microsoft.AspNetCore.Identity.Service/Microsoft.AspNetCore.Identity.Service.csproj +++ b/src/Microsoft.AspNetCore.Identity.Service/Microsoft.AspNetCore.Identity.Service.csproj @@ -14,7 +14,7 @@ - + diff --git a/src/Microsoft.AspNetCore.Identity.Specification.Tests/Microsoft.AspNetCore.Identity.Specification.Tests.csproj b/src/Microsoft.AspNetCore.Identity.Specification.Tests/Microsoft.AspNetCore.Identity.Specification.Tests.csproj index 6133bad678..fdf21942d8 100644 --- a/src/Microsoft.AspNetCore.Identity.Specification.Tests/Microsoft.AspNetCore.Identity.Specification.Tests.csproj +++ b/src/Microsoft.AspNetCore.Identity.Specification.Tests/Microsoft.AspNetCore.Identity.Specification.Tests.csproj @@ -1,4 +1,4 @@ - + @@ -14,10 +14,10 @@ - - - - + + + + diff --git a/src/Microsoft.AspNetCore.Identity/Microsoft.AspNetCore.Identity.csproj b/src/Microsoft.AspNetCore.Identity/Microsoft.AspNetCore.Identity.csproj index 4a5a88ad8f..4a2047a324 100644 --- a/src/Microsoft.AspNetCore.Identity/Microsoft.AspNetCore.Identity.csproj +++ b/src/Microsoft.AspNetCore.Identity/Microsoft.AspNetCore.Identity.csproj @@ -1,4 +1,4 @@ - + @@ -11,9 +11,9 @@ - - - + + + diff --git a/src/Microsoft.Extensions.Identity.Core/Microsoft.Extensions.Identity.Core.csproj b/src/Microsoft.Extensions.Identity.Core/Microsoft.Extensions.Identity.Core.csproj index bf3e00d25b..c9aff1c5d7 100644 --- a/src/Microsoft.Extensions.Identity.Core/Microsoft.Extensions.Identity.Core.csproj +++ b/src/Microsoft.Extensions.Identity.Core/Microsoft.Extensions.Identity.Core.csproj @@ -11,10 +11,10 @@ - - - - + + + + diff --git a/src/Microsoft.Extensions.Identity.Stores/Microsoft.Extensions.Identity.Stores.csproj b/src/Microsoft.Extensions.Identity.Stores/Microsoft.Extensions.Identity.Stores.csproj index fda563c84e..c477c49b39 100644 --- a/src/Microsoft.Extensions.Identity.Stores/Microsoft.Extensions.Identity.Stores.csproj +++ b/src/Microsoft.Extensions.Identity.Stores/Microsoft.Extensions.Identity.Stores.csproj @@ -11,8 +11,8 @@ - - + + diff --git a/test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.InMemory.Test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.InMemory.Test.csproj b/test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.InMemory.Test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.InMemory.Test.csproj index 50edce94d9..5587ef4b06 100644 --- a/test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.InMemory.Test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.InMemory.Test.csproj +++ b/test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.InMemory.Test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.InMemory.Test.csproj @@ -18,14 +18,14 @@ - - - - - - - - + + + + + + + + diff --git a/test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test.csproj b/test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test.csproj index 1a6497130d..7bb00861ba 100644 --- a/test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test.csproj +++ b/test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test/Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test.csproj @@ -19,19 +19,19 @@ - - - - - - - - - - - - - + + + + + + + + + + + + + diff --git a/test/Microsoft.AspNetCore.Identity.InMemory.Test/Microsoft.AspNetCore.Identity.InMemory.Test.csproj b/test/Microsoft.AspNetCore.Identity.InMemory.Test/Microsoft.AspNetCore.Identity.InMemory.Test.csproj index 2f8eb65950..680c3ee041 100644 --- a/test/Microsoft.AspNetCore.Identity.InMemory.Test/Microsoft.AspNetCore.Identity.InMemory.Test.csproj +++ b/test/Microsoft.AspNetCore.Identity.InMemory.Test/Microsoft.AspNetCore.Identity.InMemory.Test.csproj @@ -17,14 +17,14 @@ - - - - - - - - + + + + + + + + diff --git a/test/Microsoft.AspNetCore.Identity.Service.Abstractions.Test/Microsoft.AspNetCore.Identity.Service.Abstractions.Test.csproj b/test/Microsoft.AspNetCore.Identity.Service.Abstractions.Test/Microsoft.AspNetCore.Identity.Service.Abstractions.Test.csproj index a18986a50a..35809687c3 100644 --- a/test/Microsoft.AspNetCore.Identity.Service.Abstractions.Test/Microsoft.AspNetCore.Identity.Service.Abstractions.Test.csproj +++ b/test/Microsoft.AspNetCore.Identity.Service.Abstractions.Test/Microsoft.AspNetCore.Identity.Service.Abstractions.Test.csproj @@ -9,12 +9,12 @@ - - - - - - + + + + + + diff --git a/test/Microsoft.AspNetCore.Identity.Service.Core.Test/Microsoft.AspNetCore.Identity.Service.Core.Test.csproj b/test/Microsoft.AspNetCore.Identity.Service.Core.Test/Microsoft.AspNetCore.Identity.Service.Core.Test.csproj index 2bf15ae0a2..ff564f236b 100644 --- a/test/Microsoft.AspNetCore.Identity.Service.Core.Test/Microsoft.AspNetCore.Identity.Service.Core.Test.csproj +++ b/test/Microsoft.AspNetCore.Identity.Service.Core.Test/Microsoft.AspNetCore.Identity.Service.Core.Test.csproj @@ -11,12 +11,12 @@ - - - - - - + + + + + + diff --git a/test/Microsoft.AspNetCore.Identity.Service.EntityFrameworkCore.InMemory.Test/Microsoft.AspNetCore.Identity.Service.EntityFrameworkCore.InMemory.Test.csproj b/test/Microsoft.AspNetCore.Identity.Service.EntityFrameworkCore.InMemory.Test/Microsoft.AspNetCore.Identity.Service.EntityFrameworkCore.InMemory.Test.csproj index d96bb31a61..7bbdee12bf 100644 --- a/test/Microsoft.AspNetCore.Identity.Service.EntityFrameworkCore.InMemory.Test/Microsoft.AspNetCore.Identity.Service.EntityFrameworkCore.InMemory.Test.csproj +++ b/test/Microsoft.AspNetCore.Identity.Service.EntityFrameworkCore.InMemory.Test/Microsoft.AspNetCore.Identity.Service.EntityFrameworkCore.InMemory.Test.csproj @@ -19,14 +19,14 @@ - - - - - - - - + + + + + + + + - \ No newline at end of file + diff --git a/test/Microsoft.AspNetCore.Identity.Service.EntityFrameworkCore.Test/Microsoft.AspNetCore.Identity.Service.EntityFrameworkCore.Test.csproj b/test/Microsoft.AspNetCore.Identity.Service.EntityFrameworkCore.Test/Microsoft.AspNetCore.Identity.Service.EntityFrameworkCore.Test.csproj index e6420f31f5..5a091c1831 100644 --- a/test/Microsoft.AspNetCore.Identity.Service.EntityFrameworkCore.Test/Microsoft.AspNetCore.Identity.Service.EntityFrameworkCore.Test.csproj +++ b/test/Microsoft.AspNetCore.Identity.Service.EntityFrameworkCore.Test/Microsoft.AspNetCore.Identity.Service.EntityFrameworkCore.Test.csproj @@ -22,19 +22,19 @@ - - - - - - - - - - - - - + + + + + + + + + + + + + diff --git a/test/Microsoft.AspNetCore.Identity.Service.InMemory.Test/Microsoft.AspNetCore.Identity.Service.InMemory.Test.csproj b/test/Microsoft.AspNetCore.Identity.Service.InMemory.Test/Microsoft.AspNetCore.Identity.Service.InMemory.Test.csproj index 7f114df930..90af62f68c 100644 --- a/test/Microsoft.AspNetCore.Identity.Service.InMemory.Test/Microsoft.AspNetCore.Identity.Service.InMemory.Test.csproj +++ b/test/Microsoft.AspNetCore.Identity.Service.InMemory.Test/Microsoft.AspNetCore.Identity.Service.InMemory.Test.csproj @@ -17,14 +17,14 @@ - - - - - - - - + + + + + + + + - \ No newline at end of file + diff --git a/test/Microsoft.AspNetCore.Identity.Service.Test/Microsoft.AspNetCore.Identity.Service.Test.csproj b/test/Microsoft.AspNetCore.Identity.Service.Test/Microsoft.AspNetCore.Identity.Service.Test.csproj index 57e7e9f109..76cde2d873 100644 --- a/test/Microsoft.AspNetCore.Identity.Service.Test/Microsoft.AspNetCore.Identity.Service.Test.csproj +++ b/test/Microsoft.AspNetCore.Identity.Service.Test/Microsoft.AspNetCore.Identity.Service.Test.csproj @@ -12,12 +12,12 @@ - - - - - - + + + + + + diff --git a/test/Microsoft.AspNetCore.Identity.Test/Microsoft.AspNetCore.Identity.Test.csproj b/test/Microsoft.AspNetCore.Identity.Test/Microsoft.AspNetCore.Identity.Test.csproj index 9ff608fb10..80a35df0b5 100644 --- a/test/Microsoft.AspNetCore.Identity.Test/Microsoft.AspNetCore.Identity.Test.csproj +++ b/test/Microsoft.AspNetCore.Identity.Test/Microsoft.AspNetCore.Identity.Test.csproj @@ -17,15 +17,15 @@ - - - - - - - - - + + + + + + + + + From 8a880adf7299777d4ef025fa78c23be072fb8a08 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Mon, 9 Oct 2017 15:00:02 -0700 Subject: [PATCH 13/16] Undo unintentional change. Use xunit 2.2.0 in spec.tests projects --- build/dependencies.props | 1 + ...osoft.AspNetCore.Identity.Service.Specification.Tests.csproj | 2 +- .../Microsoft.AspNetCore.Identity.Specification.Tests.csproj | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index 05ca15a928..e5399bbd87 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -57,6 +57,7 @@ 2.0.1-rtm-83 4.4.0 2.3.0-beta2-build3683 + 2.2.0 2.3.0-beta2-build1317 diff --git a/src/Microsoft.AspNetCore.Identity.Service.Specification.Tests/Microsoft.AspNetCore.Identity.Service.Specification.Tests.csproj b/src/Microsoft.AspNetCore.Identity.Service.Specification.Tests/Microsoft.AspNetCore.Identity.Service.Specification.Tests.csproj index 8c61875e7e..8cb05f753a 100644 --- a/src/Microsoft.AspNetCore.Identity.Service.Specification.Tests/Microsoft.AspNetCore.Identity.Service.Specification.Tests.csproj +++ b/src/Microsoft.AspNetCore.Identity.Service.Specification.Tests/Microsoft.AspNetCore.Identity.Service.Specification.Tests.csproj @@ -21,7 +21,7 @@ - + diff --git a/src/Microsoft.AspNetCore.Identity.Specification.Tests/Microsoft.AspNetCore.Identity.Specification.Tests.csproj b/src/Microsoft.AspNetCore.Identity.Specification.Tests/Microsoft.AspNetCore.Identity.Specification.Tests.csproj index fdf21942d8..8b66be3b38 100644 --- a/src/Microsoft.AspNetCore.Identity.Specification.Tests/Microsoft.AspNetCore.Identity.Specification.Tests.csproj +++ b/src/Microsoft.AspNetCore.Identity.Specification.Tests/Microsoft.AspNetCore.Identity.Specification.Tests.csproj @@ -17,7 +17,7 @@ - + From 98fa107c0505a671b68a5b13d11b72ebc6168cf6 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Fri, 13 Oct 2017 12:58:55 -0700 Subject: [PATCH 14/16] Update build tools to 2.0.2-rc1-15526 and dependencies to 2.0.1-rtm-105 --- .gitignore | 1 - build.ps1 | 4 +-- build.sh | 2 +- build/dependencies.props | 60 ++++++++++++++++++++-------------------- korebuild-lock.txt | 2 ++ 5 files changed, 35 insertions(+), 34 deletions(-) create mode 100644 korebuild-lock.txt diff --git a/.gitignore b/.gitignore index d8cc8fd373..b46d85fd20 100644 --- a/.gitignore +++ b/.gitignore @@ -30,4 +30,3 @@ project.lock.json .testPublish/ global.json *.g.targets -korebuild-lock.txt diff --git a/build.ps1 b/build.ps1 index b7081bc1c2..f2be7cbb7c 100644 --- a/build.ps1 +++ b/build.ps1 @@ -103,11 +103,11 @@ function Get-KoreBuild { } } catch { - remove-item -Recurse -Force $korebuildPath -ErrorAction Ignore + Remove-Item -Recurse -Force $korebuildPath -ErrorAction Ignore throw } finally { - remove-item $tmpfile -ErrorAction Ignore + Remove-Item $tmpfile -ErrorAction Ignore } } diff --git a/build.sh b/build.sh index 5138fc4f22..14d84a8773 100755 --- a/build.sh +++ b/build.sh @@ -11,7 +11,7 @@ RED="\033[0;31m" YELLOW="\033[0;33m" MAGENTA="\033[0;95m" DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -[ -z "${DOTNET_HOME:-}"] && DOTNET_HOME="$HOME/.dotnet" +[ -z "${DOTNET_HOME:-}" ] && DOTNET_HOME="$HOME/.dotnet" config_file="$DIR/korebuild.json" verbose=false update=false diff --git a/build/dependencies.props b/build/dependencies.props index e5399bbd87..faf740a3c4 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -1,35 +1,35 @@  - 2.0.2-beta-15522 - 2.0.1-rtm-83 - 2.0.1-rtm-83 - 2.0.1-rtm-83 - 2.0.1-rtm-83 - 2.0.1-rtm-83 - 2.0.1-rtm-83 - 2.0.1-rtm-83 - 2.0.1-rtm-83 - 2.0.1-rtm-83 - 2.0.1-rtm-83 - 2.0.1-rtm-83 - 2.0.1-rtm-83 - 2.0.1-rtm-83 - 2.0.1-rtm-83 - 2.0.1-rtm-83 - 2.0.1-rtm-83 - 2.0.1-rtm-83 - 2.0.1-rtm-83 - 2.0.1-rtm-83 - 2.0.1-rtm-83 - 2.0.1-rtm-83 + 2.0.2-rc1-15526 + 2.0.1-rtm-105 + 2.0.1-rtm-105 + 2.0.1-rtm-105 + 2.0.1-rtm-105 + 2.0.1-rtm-105 + 2.0.1-rtm-105 + 2.0.1-rtm-105 + 2.0.1-rtm-105 + 2.0.1-rtm-105 + 2.0.1-rtm-105 + 2.0.1-rtm-105 + 2.0.1-rtm-105 + 2.0.1-rtm-105 + 2.0.1-rtm-105 + 2.0.1-rtm-105 + 2.0.1-rtm-105 + 2.0.1-rtm-105 + 2.0.1-rtm-105 + 2.0.1-rtm-105 + 2.0.1-rtm-105 + 2.0.1-rtm-105 2.0.0 2.2.1 2.3.2 - 2.0.1-rtm-83 - 2.0.1-rtm-83 - 2.0.1-rtm-83 - 2.0.1-rtm-83 - 2.0.1-rtm-83 + 2.0.1-rtm-105 + 2.0.1-rtm-105 + 2.0.1-rtm-105 + 2.0.1-rtm-105 + 2.0.1-rtm-105 2.0.0 2.0.0 2.0.0 @@ -51,10 +51,10 @@ 2.1.4 15.3.0 3.0.1 - 2.0.1-rtm-83 - 2.0.1-rtm-83 + 2.0.1-rtm-105 + 2.0.1-rtm-105 4.7.49 - 2.0.1-rtm-83 + 2.0.1-rtm-105 4.4.0 2.3.0-beta2-build3683 2.2.0 diff --git a/korebuild-lock.txt b/korebuild-lock.txt new file mode 100644 index 0000000000..632c589cce --- /dev/null +++ b/korebuild-lock.txt @@ -0,0 +1,2 @@ +version:2.0.2-rc1-15526 +commithash:436afc3dc08f5e278431db807866cc5f032f4d7b From 8c47b90677c0f544844151418ba94f24d9f2a094 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Thu, 26 Oct 2017 13:19:50 -0700 Subject: [PATCH 15/16] Update fix to ChangePhoneNumber - Added Quirk mode to control default provider - Fixed new regression --- .../UserManagerSpecificationTests.cs | 41 ++++++++++++++++++- .../TokenOptions.cs | 6 ++- .../UserManager.cs | 23 ++++------- .../IdentityOptionsTest.cs | 8 ++++ 4 files changed, 60 insertions(+), 18 deletions(-) diff --git a/src/Microsoft.AspNetCore.Identity.Specification.Tests/UserManagerSpecificationTests.cs b/src/Microsoft.AspNetCore.Identity.Specification.Tests/UserManagerSpecificationTests.cs index 7bf7f81aa8..8e0a5f39f2 100644 --- a/src/Microsoft.AspNetCore.Identity.Specification.Tests/UserManagerSpecificationTests.cs +++ b/src/Microsoft.AspNetCore.Identity.Specification.Tests/UserManagerSpecificationTests.cs @@ -1568,12 +1568,48 @@ namespace Microsoft.AspNetCore.Identity.Test var stamp = await manager.GetSecurityStampAsync(user); IdentityResultAssert.IsFailure(await manager.ChangePhoneNumberAsync(user, "111-111-1111", "bogus"), "Invalid token."); - IdentityResultAssert.VerifyLogMessage(manager.Logger, $"VerifyChangePhoneNumberTokenAsync() failed for user { await manager.GetUserIdAsync(user)}."); + IdentityResultAssert.VerifyLogMessage(manager.Logger, $"VerifyUserTokenAsync() failed with purpose: ChangePhoneNumber:111-111-1111 for user {await manager.GetUserIdAsync(user)}."); Assert.False(await manager.IsPhoneNumberConfirmedAsync(user)); Assert.Equal("123-456-7890", await manager.GetPhoneNumberAsync(user)); Assert.Equal(stamp, await manager.GetSecurityStampAsync(user)); } + private class YesPhoneNumberProvider : IUserTwoFactorTokenProvider + { + public Task CanGenerateTwoFactorTokenAsync(UserManager manager, TUser user) + => Task.FromResult(true); + + public Task GenerateAsync(string purpose, UserManager manager, TUser user) + => Task.FromResult(purpose); + + public Task ValidateAsync(string purpose, string token, UserManager manager, TUser user) + => Task.FromResult(true); + } + + /// + /// Test. + /// + /// Task + [Fact] + public async Task ChangePhoneNumberWithCustomProvider() + { + if (ShouldSkipDbTests()) + { + return; + } + var manager = CreateManager(); + manager.RegisterTokenProvider("Yes", new YesPhoneNumberProvider()); + manager.Options.Tokens.ChangePhoneNumberTokenProvider = "Yes"; + var user = CreateTestUser(phoneNumber: "123-456-7890"); + IdentityResultAssert.IsSuccess(await manager.CreateAsync(user)); + Assert.False(await manager.IsPhoneNumberConfirmedAsync(user)); + var stamp = await manager.GetSecurityStampAsync(user); + IdentityResultAssert.IsSuccess(await manager.ChangePhoneNumberAsync(user, "111-111-1111", "whatever")); + Assert.True(await manager.IsPhoneNumberConfirmedAsync(user)); + Assert.Equal("111-111-1111", await manager.GetPhoneNumberAsync(user)); + Assert.NotEqual(stamp, await manager.GetSecurityStampAsync(user)); + } + /// /// Test. /// @@ -1623,7 +1659,8 @@ namespace Microsoft.AspNetCore.Identity.Test Assert.True(await manager.VerifyChangePhoneNumberTokenAsync(user, token2, num2)); Assert.False(await manager.VerifyChangePhoneNumberTokenAsync(user, token2, num1)); Assert.False(await manager.VerifyChangePhoneNumberTokenAsync(user, token1, num2)); - IdentityResultAssert.VerifyLogMessage(manager.Logger, $"VerifyChangePhoneNumberTokenAsync() failed for user {await manager.GetUserIdAsync(user)}."); + IdentityResultAssert.VerifyLogMessage(manager.Logger, $"VerifyUserTokenAsync() failed with purpose: ChangePhoneNumber:{num1} for user {await manager.GetUserIdAsync(user)}."); + IdentityResultAssert.VerifyLogMessage(manager.Logger, $"VerifyUserTokenAsync() failed with purpose: ChangePhoneNumber:{num2} for user {await manager.GetUserIdAsync(user)}."); } /// diff --git a/src/Microsoft.Extensions.Identity.Core/TokenOptions.cs b/src/Microsoft.Extensions.Identity.Core/TokenOptions.cs index bb54619c2e..a3983e200a 100644 --- a/src/Microsoft.Extensions.Identity.Core/TokenOptions.cs +++ b/src/Microsoft.Extensions.Identity.Core/TokenOptions.cs @@ -66,7 +66,7 @@ namespace Microsoft.AspNetCore.Identity /// /// The used to generate tokens used when changing phone numbers. /// - public string ChangePhoneNumberTokenProvider { get; set; } = DefaultProvider; + public string ChangePhoneNumberTokenProvider { get; set; } = GetDefaultChangePhoneNumberTokenProvider(); /// /// Gets or sets the used to validate two factor sign ins with an authenticator. @@ -75,5 +75,9 @@ namespace Microsoft.AspNetCore.Identity /// The used to validate two factor sign ins with an authenticator. /// public string AuthenticatorTokenProvider { get; set; } = DefaultAuthenticatorProvider; + + private static string GetDefaultChangePhoneNumberTokenProvider() + => (AppContext.TryGetSwitch("Microsoft.AspNetCore.Identity.ChangePhoneNumberTokenProvider1483", out var enabled) && enabled) + ? DefaultProvider : DefaultPhoneProvider; } } \ No newline at end of file diff --git a/src/Microsoft.Extensions.Identity.Core/UserManager.cs b/src/Microsoft.Extensions.Identity.Core/UserManager.cs index 819b93bba0..8ced663058 100644 --- a/src/Microsoft.Extensions.Identity.Core/UserManager.cs +++ b/src/Microsoft.Extensions.Identity.Core/UserManager.cs @@ -1580,12 +1580,10 @@ namespace Microsoft.AspNetCore.Identity /// /// The that represents the asynchronous operation, containing the telephone change number token. /// - public virtual async Task GenerateChangePhoneNumberTokenAsync(TUser user, string phoneNumber) + public virtual Task GenerateChangePhoneNumberTokenAsync(TUser user, string phoneNumber) { ThrowIfDisposed(); - return Rfc6238AuthenticationService.GenerateCode( - await CreateSecurityTokenAsync(user), phoneNumber) - .ToString(CultureInfo.InvariantCulture); + return GenerateUserTokenAsync(user, Options.Tokens.ChangePhoneNumberTokenProvider, ChangePhoneNumberTokenPurpose + ":" + phoneNumber); } /// @@ -1599,21 +1597,16 @@ namespace Microsoft.AspNetCore.Identity /// The that represents the asynchronous operation, returning true if the /// is valid, otherwise false. /// - public virtual async Task VerifyChangePhoneNumberTokenAsync(TUser user, string token, string phoneNumber) + public virtual Task VerifyChangePhoneNumberTokenAsync(TUser user, string token, string phoneNumber) { ThrowIfDisposed(); - - var securityToken = await CreateSecurityTokenAsync(user); - int code; - if (securityToken != null && Int32.TryParse(token, out code)) + if (user == null) { - if (Rfc6238AuthenticationService.ValidateCode(securityToken, code, phoneNumber)) - { - return true; - } + throw new ArgumentNullException(nameof(user)); } - Logger.LogWarning(8, "VerifyChangePhoneNumberTokenAsync() failed for user {userId}.", await GetUserIdAsync(user)); - return false; + + // Make sure the token is valid and the stamp matches + return VerifyUserTokenAsync(user, Options.Tokens.ChangePhoneNumberTokenProvider, ChangePhoneNumberTokenPurpose+":"+ phoneNumber, token); } /// diff --git a/test/Microsoft.AspNetCore.Identity.Test/IdentityOptionsTest.cs b/test/Microsoft.AspNetCore.Identity.Test/IdentityOptionsTest.cs index d5dde4190b..094bff29de 100644 --- a/test/Microsoft.AspNetCore.Identity.Test/IdentityOptionsTest.cs +++ b/test/Microsoft.AspNetCore.Identity.Test/IdentityOptionsTest.cs @@ -14,6 +14,14 @@ namespace Microsoft.AspNetCore.Identity.Test { public class IdentityOptionsTest { + [Fact] + public void VerifyQuirkChangePhoneNumberTokenProvider1483() + { + Assert.Equal(TokenOptions.DefaultPhoneProvider, new TokenOptions().ChangePhoneNumberTokenProvider); + AppContext.SetSwitch("Microsoft.AspNetCore.Identity.ChangePhoneNumberTokenProvider1483", true); + Assert.Equal(TokenOptions.DefaultProvider, new TokenOptions().ChangePhoneNumberTokenProvider); + } + [Fact] public void VerifyDefaultOptions() { From becf1df9c5a3b908e28ec3c1272b072d8801e3dc Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Wed, 6 Dec 2017 15:08:58 -0800 Subject: [PATCH 16/16] Mark Identity service packages as IsPackable=false --- ...Microsoft.AspNetCore.Diagnostics.Identity.Service.csproj | 2 ++ ...icrosoft.AspNetCore.Identity.Service.Abstractions.csproj | 2 ++ ...crosoft.AspNetCore.Identity.Service.AzureKeyVault.csproj | 2 ++ .../Microsoft.AspNetCore.Identity.Service.Core.csproj | 2 ++ ...t.AspNetCore.Identity.Service.EntityFrameworkCore.csproj | 2 ++ ...t.AspNetCore.Identity.Service.IntegratedWebClient.csproj | 6 ++++-- .../Microsoft.AspNetCore.Identity.Service.Mvc.csproj | 2 ++ ...t.AspNetCore.Identity.Service.Specification.Tests.csproj | 2 ++ .../Microsoft.AspNetCore.Identity.Service.csproj | 2 ++ 9 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.AspNetCore.Diagnostics.Identity.Service/Microsoft.AspNetCore.Diagnostics.Identity.Service.csproj b/src/Microsoft.AspNetCore.Diagnostics.Identity.Service/Microsoft.AspNetCore.Diagnostics.Identity.Service.csproj index 4ce5ab55d4..75e658ba0f 100644 --- a/src/Microsoft.AspNetCore.Diagnostics.Identity.Service/Microsoft.AspNetCore.Diagnostics.Identity.Service.csproj +++ b/src/Microsoft.AspNetCore.Diagnostics.Identity.Service/Microsoft.AspNetCore.Diagnostics.Identity.Service.csproj @@ -3,6 +3,8 @@ + + false ASP.NET Core Identity Service Diagnostics Middleware. netcoreapp2.0;netstandard2.0 $(NoWarn);CS1591 diff --git a/src/Microsoft.AspNetCore.Identity.Service.Abstractions/Microsoft.AspNetCore.Identity.Service.Abstractions.csproj b/src/Microsoft.AspNetCore.Identity.Service.Abstractions/Microsoft.AspNetCore.Identity.Service.Abstractions.csproj index 8a8f3f34a2..76cdd2afa6 100644 --- a/src/Microsoft.AspNetCore.Identity.Service.Abstractions/Microsoft.AspNetCore.Identity.Service.Abstractions.csproj +++ b/src/Microsoft.AspNetCore.Identity.Service.Abstractions/Microsoft.AspNetCore.Identity.Service.Abstractions.csproj @@ -3,6 +3,8 @@ + + false ASP.NET Core common types defining the main abstractions for Identity Service. netstandard2.0 $(NoWarn);CS1591 diff --git a/src/Microsoft.AspNetCore.Identity.Service.AzureKeyVault/Microsoft.AspNetCore.Identity.Service.AzureKeyVault.csproj b/src/Microsoft.AspNetCore.Identity.Service.AzureKeyVault/Microsoft.AspNetCore.Identity.Service.AzureKeyVault.csproj index 49a169a371..fe4f954e00 100644 --- a/src/Microsoft.AspNetCore.Identity.Service.AzureKeyVault/Microsoft.AspNetCore.Identity.Service.AzureKeyVault.csproj +++ b/src/Microsoft.AspNetCore.Identity.Service.AzureKeyVault/Microsoft.AspNetCore.Identity.Service.AzureKeyVault.csproj @@ -3,6 +3,8 @@ + + false ASP.NET Core Identity Azure Key Vault certificates support. netstandard2.0 $(NoWarn);CS1591 diff --git a/src/Microsoft.AspNetCore.Identity.Service.Core/Microsoft.AspNetCore.Identity.Service.Core.csproj b/src/Microsoft.AspNetCore.Identity.Service.Core/Microsoft.AspNetCore.Identity.Service.Core.csproj index a2591c625c..30e207a095 100644 --- a/src/Microsoft.AspNetCore.Identity.Service.Core/Microsoft.AspNetCore.Identity.Service.Core.csproj +++ b/src/Microsoft.AspNetCore.Identity.Service.Core/Microsoft.AspNetCore.Identity.Service.Core.csproj @@ -3,6 +3,8 @@ + + false ASP.NET Core common types implementing the main abstractions for Identity Service. netstandard2.0 $(NoWarn);CS1591 diff --git a/src/Microsoft.AspNetCore.Identity.Service.EntityFrameworkCore/Microsoft.AspNetCore.Identity.Service.EntityFrameworkCore.csproj b/src/Microsoft.AspNetCore.Identity.Service.EntityFrameworkCore/Microsoft.AspNetCore.Identity.Service.EntityFrameworkCore.csproj index 11a5674d31..4f660a9e33 100644 --- a/src/Microsoft.AspNetCore.Identity.Service.EntityFrameworkCore/Microsoft.AspNetCore.Identity.Service.EntityFrameworkCore.csproj +++ b/src/Microsoft.AspNetCore.Identity.Service.EntityFrameworkCore/Microsoft.AspNetCore.Identity.Service.EntityFrameworkCore.csproj @@ -3,6 +3,8 @@ + + false ASP.NET Core Identity Service implementation based on ASP.NET Core Identity. netstandard2.0 $(NoWarn);CS1591 diff --git a/src/Microsoft.AspNetCore.Identity.Service.IntegratedWebClient/Microsoft.AspNetCore.Identity.Service.IntegratedWebClient.csproj b/src/Microsoft.AspNetCore.Identity.Service.IntegratedWebClient/Microsoft.AspNetCore.Identity.Service.IntegratedWebClient.csproj index 3b45d9f2f0..36d60fabf0 100644 --- a/src/Microsoft.AspNetCore.Identity.Service.IntegratedWebClient/Microsoft.AspNetCore.Identity.Service.IntegratedWebClient.csproj +++ b/src/Microsoft.AspNetCore.Identity.Service.IntegratedWebClient/Microsoft.AspNetCore.Identity.Service.IntegratedWebClient.csproj @@ -3,6 +3,8 @@ + + false ASP.NET Core Identity Service in process client. netstandard2.0 $(NoWarn);CS1591 @@ -15,9 +17,9 @@ - + - \ No newline at end of file + diff --git a/src/Microsoft.AspNetCore.Identity.Service.Mvc/Microsoft.AspNetCore.Identity.Service.Mvc.csproj b/src/Microsoft.AspNetCore.Identity.Service.Mvc/Microsoft.AspNetCore.Identity.Service.Mvc.csproj index 9de5d5d1c4..fca5b86b03 100644 --- a/src/Microsoft.AspNetCore.Identity.Service.Mvc/Microsoft.AspNetCore.Identity.Service.Mvc.csproj +++ b/src/Microsoft.AspNetCore.Identity.Service.Mvc/Microsoft.AspNetCore.Identity.Service.Mvc.csproj @@ -3,6 +3,8 @@ + + false ASP.NET Core Identity Service integration for ASP.NET Core MVC. netstandard2.0 $(NoWarn);CS1591 diff --git a/src/Microsoft.AspNetCore.Identity.Service.Specification.Tests/Microsoft.AspNetCore.Identity.Service.Specification.Tests.csproj b/src/Microsoft.AspNetCore.Identity.Service.Specification.Tests/Microsoft.AspNetCore.Identity.Service.Specification.Tests.csproj index 8cb05f753a..7d4c18fb6f 100644 --- a/src/Microsoft.AspNetCore.Identity.Service.Specification.Tests/Microsoft.AspNetCore.Identity.Service.Specification.Tests.csproj +++ b/src/Microsoft.AspNetCore.Identity.Service.Specification.Tests/Microsoft.AspNetCore.Identity.Service.Specification.Tests.csproj @@ -3,6 +3,8 @@ + + false Shared test suite for Asp.Net Identity Core as a service store implementations. netstandard2.0 true diff --git a/src/Microsoft.AspNetCore.Identity.Service/Microsoft.AspNetCore.Identity.Service.csproj b/src/Microsoft.AspNetCore.Identity.Service/Microsoft.AspNetCore.Identity.Service.csproj index e2cd04a535..d2a49cd820 100644 --- a/src/Microsoft.AspNetCore.Identity.Service/Microsoft.AspNetCore.Identity.Service.csproj +++ b/src/Microsoft.AspNetCore.Identity.Service/Microsoft.AspNetCore.Identity.Service.csproj @@ -3,6 +3,8 @@ + + false ASP.NET Core Identity Service implementation based on Entity Framework. netstandard2.0 $(NoWarn);CS1591