From afc361b0127aeafe39825e6c0a5952ee4472e18f Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Wed, 28 May 2014 12:16:22 -0700 Subject: [PATCH] Use OptionModel.Options Remove IdentityOptionsSetup and related config functionality --- Identity.sln | 164 +++++++-------- .../Microsoft.AspNet.Identity.Entity.kproj | 9 +- .../Microsoft.AspNet.Identity.Security.kproj | 4 +- .../IdentityBuilder.cs | 1 + .../IdentityOptionsSetup.cs | 67 ------ .../IdentityServiceCollectionExtensions.cs | 45 +++- .../Microsoft.AspNet.Identity.kproj | 3 +- src/Microsoft.AspNet.Identity/UserManager.cs | 2 +- src/Microsoft.AspNet.Identity/project.json | 1 + temp/Identity45.sln | 192 +++++++++--------- .../InMemoryUserStoreTest.cs | 3 +- ...icrosoft.AspNet.Identity.Entity.Test.kproj | 6 +- .../SqlUserStoreTest.cs | 1 + .../StartupTest.cs | 1 + .../TestIdentityFactory.cs | 11 +- .../project.json | 1 + .../InMemoryStoreTest.cs | 6 +- ...rosoft.AspNet.Identity.InMemory.Test.kproj | 3 +- .../StartupTest.cs | 3 +- .../project.json | 1 + ...rosoft.AspNet.Identity.Security.Test.kproj | 3 +- .../project.json | 1 + .../IdentityOptionsTest.cs | 8 +- .../UserManagerTest.cs | 1 + .../project.json | 1 + test/Shared/IdentityConfig.cs | 2 +- test/Shared/MockHelpers.cs | 1 + test/Shared/UserManagerTestBase.cs | 4 +- 28 files changed, 257 insertions(+), 288 deletions(-) delete mode 100644 src/Microsoft.AspNet.Identity/IdentityOptionsSetup.cs diff --git a/Identity.sln b/Identity.sln index 8cfc0a77c2..28c6a6ef28 100644 --- a/Identity.sln +++ b/Identity.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.30327.0 +# Visual Studio 14 +VisualStudioVersion = 14.0.21722.1 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{0F647068-6602-4E24-B1DC-8ED91481A50A}" EndProject @@ -33,86 +33,86 @@ Global Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {01A9DA71-5C42-4ED5-AD0C-D6FAF11C0A74}.Debug|Any CPU.ActiveCfg = Debug|x86 - {01A9DA71-5C42-4ED5-AD0C-D6FAF11C0A74}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {01A9DA71-5C42-4ED5-AD0C-D6FAF11C0A74}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {01A9DA71-5C42-4ED5-AD0C-D6FAF11C0A74}.Debug|x86.ActiveCfg = Debug|x86 - {01A9DA71-5C42-4ED5-AD0C-D6FAF11C0A74}.Debug|x86.Build.0 = Debug|x86 - {01A9DA71-5C42-4ED5-AD0C-D6FAF11C0A74}.Release|Any CPU.ActiveCfg = Release|x86 - {01A9DA71-5C42-4ED5-AD0C-D6FAF11C0A74}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {01A9DA71-5C42-4ED5-AD0C-D6FAF11C0A74}.Release|Mixed Platforms.Build.0 = Release|x86 - {01A9DA71-5C42-4ED5-AD0C-D6FAF11C0A74}.Release|x86.ActiveCfg = Release|x86 - {01A9DA71-5C42-4ED5-AD0C-D6FAF11C0A74}.Release|x86.Build.0 = Release|x86 - {1729302E-A58E-4652-B639-5B6B68DA2748}.Debug|Any CPU.ActiveCfg = Debug|x86 - {1729302E-A58E-4652-B639-5B6B68DA2748}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {1729302E-A58E-4652-B639-5B6B68DA2748}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {1729302E-A58E-4652-B639-5B6B68DA2748}.Debug|x86.ActiveCfg = Debug|x86 - {1729302E-A58E-4652-B639-5B6B68DA2748}.Debug|x86.Build.0 = Debug|x86 - {1729302E-A58E-4652-B639-5B6B68DA2748}.Release|Any CPU.ActiveCfg = Release|x86 - {1729302E-A58E-4652-B639-5B6B68DA2748}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {1729302E-A58E-4652-B639-5B6B68DA2748}.Release|Mixed Platforms.Build.0 = Release|x86 - {1729302E-A58E-4652-B639-5B6B68DA2748}.Release|x86.ActiveCfg = Release|x86 - {1729302E-A58E-4652-B639-5B6B68DA2748}.Release|x86.Build.0 = Release|x86 - {AD42BAFB-1993-4FAF-A280-3711A9F33E2F}.Debug|Any CPU.ActiveCfg = Debug|x86 - {AD42BAFB-1993-4FAF-A280-3711A9F33E2F}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {AD42BAFB-1993-4FAF-A280-3711A9F33E2F}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {AD42BAFB-1993-4FAF-A280-3711A9F33E2F}.Debug|x86.ActiveCfg = Debug|x86 - {AD42BAFB-1993-4FAF-A280-3711A9F33E2F}.Debug|x86.Build.0 = Debug|x86 - {AD42BAFB-1993-4FAF-A280-3711A9F33E2F}.Release|Any CPU.ActiveCfg = Release|x86 - {AD42BAFB-1993-4FAF-A280-3711A9F33E2F}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {AD42BAFB-1993-4FAF-A280-3711A9F33E2F}.Release|Mixed Platforms.Build.0 = Release|x86 - {AD42BAFB-1993-4FAF-A280-3711A9F33E2F}.Release|x86.ActiveCfg = Release|x86 - {AD42BAFB-1993-4FAF-A280-3711A9F33E2F}.Release|x86.Build.0 = Release|x86 - {7B4CFF5A-1948-45EC-B170-6EB7C039B2F9}.Debug|Any CPU.ActiveCfg = Debug|x86 - {7B4CFF5A-1948-45EC-B170-6EB7C039B2F9}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {7B4CFF5A-1948-45EC-B170-6EB7C039B2F9}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {7B4CFF5A-1948-45EC-B170-6EB7C039B2F9}.Debug|x86.ActiveCfg = Debug|x86 - {7B4CFF5A-1948-45EC-B170-6EB7C039B2F9}.Debug|x86.Build.0 = Debug|x86 - {7B4CFF5A-1948-45EC-B170-6EB7C039B2F9}.Release|Any CPU.ActiveCfg = Release|x86 - {7B4CFF5A-1948-45EC-B170-6EB7C039B2F9}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {7B4CFF5A-1948-45EC-B170-6EB7C039B2F9}.Release|Mixed Platforms.Build.0 = Release|x86 - {7B4CFF5A-1948-45EC-B170-6EB7C039B2F9}.Release|x86.ActiveCfg = Release|x86 - {7B4CFF5A-1948-45EC-B170-6EB7C039B2F9}.Release|x86.Build.0 = Release|x86 - {2CF3927B-19E4-4866-9BAA-2C131580E7C3}.Debug|Any CPU.ActiveCfg = Debug|x86 - {2CF3927B-19E4-4866-9BAA-2C131580E7C3}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {2CF3927B-19E4-4866-9BAA-2C131580E7C3}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {2CF3927B-19E4-4866-9BAA-2C131580E7C3}.Debug|x86.ActiveCfg = Debug|x86 - {2CF3927B-19E4-4866-9BAA-2C131580E7C3}.Debug|x86.Build.0 = Debug|x86 - {2CF3927B-19E4-4866-9BAA-2C131580E7C3}.Release|Any CPU.ActiveCfg = Release|x86 - {2CF3927B-19E4-4866-9BAA-2C131580E7C3}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {2CF3927B-19E4-4866-9BAA-2C131580E7C3}.Release|Mixed Platforms.Build.0 = Release|x86 - {2CF3927B-19E4-4866-9BAA-2C131580E7C3}.Release|x86.ActiveCfg = Release|x86 - {2CF3927B-19E4-4866-9BAA-2C131580E7C3}.Release|x86.Build.0 = Release|x86 - {823453CC-5846-4D49-B343-15BC0074CA60}.Debug|Any CPU.ActiveCfg = Debug|x86 - {823453CC-5846-4D49-B343-15BC0074CA60}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {823453CC-5846-4D49-B343-15BC0074CA60}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {823453CC-5846-4D49-B343-15BC0074CA60}.Debug|x86.ActiveCfg = Debug|x86 - {823453CC-5846-4D49-B343-15BC0074CA60}.Debug|x86.Build.0 = Debug|x86 - {823453CC-5846-4D49-B343-15BC0074CA60}.Release|Any CPU.ActiveCfg = Release|x86 - {823453CC-5846-4D49-B343-15BC0074CA60}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {823453CC-5846-4D49-B343-15BC0074CA60}.Release|Mixed Platforms.Build.0 = Release|x86 - {823453CC-5846-4D49-B343-15BC0074CA60}.Release|x86.ActiveCfg = Release|x86 - {823453CC-5846-4D49-B343-15BC0074CA60}.Release|x86.Build.0 = Release|x86 - {65161409-C4C4-4D63-A73B-231FCFF4D503}.Debug|Any CPU.ActiveCfg = Debug|x86 - {65161409-C4C4-4D63-A73B-231FCFF4D503}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {65161409-C4C4-4D63-A73B-231FCFF4D503}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {65161409-C4C4-4D63-A73B-231FCFF4D503}.Debug|x86.ActiveCfg = Debug|x86 - {65161409-C4C4-4D63-A73B-231FCFF4D503}.Debug|x86.Build.0 = Debug|x86 - {65161409-C4C4-4D63-A73B-231FCFF4D503}.Release|Any CPU.ActiveCfg = Release|x86 - {65161409-C4C4-4D63-A73B-231FCFF4D503}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {65161409-C4C4-4D63-A73B-231FCFF4D503}.Release|Mixed Platforms.Build.0 = Release|x86 - {65161409-C4C4-4D63-A73B-231FCFF4D503}.Release|x86.ActiveCfg = Release|x86 - {65161409-C4C4-4D63-A73B-231FCFF4D503}.Release|x86.Build.0 = Release|x86 - {B4C067C1-F934-493C-9DBC-19E8CA305613}.Debug|Any CPU.ActiveCfg = Debug|x86 - {B4C067C1-F934-493C-9DBC-19E8CA305613}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {B4C067C1-F934-493C-9DBC-19E8CA305613}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {B4C067C1-F934-493C-9DBC-19E8CA305613}.Debug|x86.ActiveCfg = Debug|x86 - {B4C067C1-F934-493C-9DBC-19E8CA305613}.Debug|x86.Build.0 = Debug|x86 - {B4C067C1-F934-493C-9DBC-19E8CA305613}.Release|Any CPU.ActiveCfg = Release|x86 - {B4C067C1-F934-493C-9DBC-19E8CA305613}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {B4C067C1-F934-493C-9DBC-19E8CA305613}.Release|Mixed Platforms.Build.0 = Release|x86 - {B4C067C1-F934-493C-9DBC-19E8CA305613}.Release|x86.ActiveCfg = Release|x86 - {B4C067C1-F934-493C-9DBC-19E8CA305613}.Release|x86.Build.0 = Release|x86 + {01A9DA71-5C42-4ED5-AD0C-D6FAF11C0A74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {01A9DA71-5C42-4ED5-AD0C-D6FAF11C0A74}.Debug|Any CPU.Build.0 = Debug|Any CPU + {01A9DA71-5C42-4ED5-AD0C-D6FAF11C0A74}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {01A9DA71-5C42-4ED5-AD0C-D6FAF11C0A74}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {01A9DA71-5C42-4ED5-AD0C-D6FAF11C0A74}.Debug|x86.ActiveCfg = Debug|Any CPU + {01A9DA71-5C42-4ED5-AD0C-D6FAF11C0A74}.Release|Any CPU.ActiveCfg = Release|Any CPU + {01A9DA71-5C42-4ED5-AD0C-D6FAF11C0A74}.Release|Any CPU.Build.0 = Release|Any CPU + {01A9DA71-5C42-4ED5-AD0C-D6FAF11C0A74}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {01A9DA71-5C42-4ED5-AD0C-D6FAF11C0A74}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {01A9DA71-5C42-4ED5-AD0C-D6FAF11C0A74}.Release|x86.ActiveCfg = Release|Any CPU + {1729302E-A58E-4652-B639-5B6B68DA2748}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1729302E-A58E-4652-B639-5B6B68DA2748}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1729302E-A58E-4652-B639-5B6B68DA2748}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {1729302E-A58E-4652-B639-5B6B68DA2748}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {1729302E-A58E-4652-B639-5B6B68DA2748}.Debug|x86.ActiveCfg = Debug|Any CPU + {1729302E-A58E-4652-B639-5B6B68DA2748}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1729302E-A58E-4652-B639-5B6B68DA2748}.Release|Any CPU.Build.0 = Release|Any CPU + {1729302E-A58E-4652-B639-5B6B68DA2748}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {1729302E-A58E-4652-B639-5B6B68DA2748}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {1729302E-A58E-4652-B639-5B6B68DA2748}.Release|x86.ActiveCfg = Release|Any CPU + {AD42BAFB-1993-4FAF-A280-3711A9F33E2F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AD42BAFB-1993-4FAF-A280-3711A9F33E2F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AD42BAFB-1993-4FAF-A280-3711A9F33E2F}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {AD42BAFB-1993-4FAF-A280-3711A9F33E2F}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {AD42BAFB-1993-4FAF-A280-3711A9F33E2F}.Debug|x86.ActiveCfg = Debug|Any CPU + {AD42BAFB-1993-4FAF-A280-3711A9F33E2F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AD42BAFB-1993-4FAF-A280-3711A9F33E2F}.Release|Any CPU.Build.0 = Release|Any CPU + {AD42BAFB-1993-4FAF-A280-3711A9F33E2F}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {AD42BAFB-1993-4FAF-A280-3711A9F33E2F}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {AD42BAFB-1993-4FAF-A280-3711A9F33E2F}.Release|x86.ActiveCfg = Release|Any CPU + {7B4CFF5A-1948-45EC-B170-6EB7C039B2F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7B4CFF5A-1948-45EC-B170-6EB7C039B2F9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7B4CFF5A-1948-45EC-B170-6EB7C039B2F9}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {7B4CFF5A-1948-45EC-B170-6EB7C039B2F9}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {7B4CFF5A-1948-45EC-B170-6EB7C039B2F9}.Debug|x86.ActiveCfg = Debug|Any CPU + {7B4CFF5A-1948-45EC-B170-6EB7C039B2F9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7B4CFF5A-1948-45EC-B170-6EB7C039B2F9}.Release|Any CPU.Build.0 = Release|Any CPU + {7B4CFF5A-1948-45EC-B170-6EB7C039B2F9}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {7B4CFF5A-1948-45EC-B170-6EB7C039B2F9}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {7B4CFF5A-1948-45EC-B170-6EB7C039B2F9}.Release|x86.ActiveCfg = Release|Any CPU + {2CF3927B-19E4-4866-9BAA-2C131580E7C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2CF3927B-19E4-4866-9BAA-2C131580E7C3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2CF3927B-19E4-4866-9BAA-2C131580E7C3}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {2CF3927B-19E4-4866-9BAA-2C131580E7C3}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {2CF3927B-19E4-4866-9BAA-2C131580E7C3}.Debug|x86.ActiveCfg = Debug|Any CPU + {2CF3927B-19E4-4866-9BAA-2C131580E7C3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2CF3927B-19E4-4866-9BAA-2C131580E7C3}.Release|Any CPU.Build.0 = Release|Any CPU + {2CF3927B-19E4-4866-9BAA-2C131580E7C3}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {2CF3927B-19E4-4866-9BAA-2C131580E7C3}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {2CF3927B-19E4-4866-9BAA-2C131580E7C3}.Release|x86.ActiveCfg = Release|Any CPU + {823453CC-5846-4D49-B343-15BC0074CA60}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {823453CC-5846-4D49-B343-15BC0074CA60}.Debug|Any CPU.Build.0 = Debug|Any CPU + {823453CC-5846-4D49-B343-15BC0074CA60}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {823453CC-5846-4D49-B343-15BC0074CA60}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {823453CC-5846-4D49-B343-15BC0074CA60}.Debug|x86.ActiveCfg = Debug|Any CPU + {823453CC-5846-4D49-B343-15BC0074CA60}.Release|Any CPU.ActiveCfg = Release|Any CPU + {823453CC-5846-4D49-B343-15BC0074CA60}.Release|Any CPU.Build.0 = Release|Any CPU + {823453CC-5846-4D49-B343-15BC0074CA60}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {823453CC-5846-4D49-B343-15BC0074CA60}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {823453CC-5846-4D49-B343-15BC0074CA60}.Release|x86.ActiveCfg = Release|Any CPU + {65161409-C4C4-4D63-A73B-231FCFF4D503}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {65161409-C4C4-4D63-A73B-231FCFF4D503}.Debug|Any CPU.Build.0 = Debug|Any CPU + {65161409-C4C4-4D63-A73B-231FCFF4D503}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {65161409-C4C4-4D63-A73B-231FCFF4D503}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {65161409-C4C4-4D63-A73B-231FCFF4D503}.Debug|x86.ActiveCfg = Debug|Any CPU + {65161409-C4C4-4D63-A73B-231FCFF4D503}.Release|Any CPU.ActiveCfg = Release|Any CPU + {65161409-C4C4-4D63-A73B-231FCFF4D503}.Release|Any CPU.Build.0 = Release|Any CPU + {65161409-C4C4-4D63-A73B-231FCFF4D503}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {65161409-C4C4-4D63-A73B-231FCFF4D503}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {65161409-C4C4-4D63-A73B-231FCFF4D503}.Release|x86.ActiveCfg = Release|Any CPU + {B4C067C1-F934-493C-9DBC-19E8CA305613}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B4C067C1-F934-493C-9DBC-19E8CA305613}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B4C067C1-F934-493C-9DBC-19E8CA305613}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {B4C067C1-F934-493C-9DBC-19E8CA305613}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {B4C067C1-F934-493C-9DBC-19E8CA305613}.Debug|x86.ActiveCfg = Debug|Any CPU + {B4C067C1-F934-493C-9DBC-19E8CA305613}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B4C067C1-F934-493C-9DBC-19E8CA305613}.Release|Any CPU.Build.0 = Release|Any CPU + {B4C067C1-F934-493C-9DBC-19E8CA305613}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {B4C067C1-F934-493C-9DBC-19E8CA305613}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {B4C067C1-F934-493C-9DBC-19E8CA305613}.Release|x86.ActiveCfg = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/Microsoft.AspNet.Identity.Entity/Microsoft.AspNet.Identity.Entity.kproj b/src/Microsoft.AspNet.Identity.Entity/Microsoft.AspNet.Identity.Entity.kproj index 92b660fc5a..d31063f4c7 100644 --- a/src/Microsoft.AspNet.Identity.Entity/Microsoft.AspNet.Identity.Entity.kproj +++ b/src/Microsoft.AspNet.Identity.Entity/Microsoft.AspNet.Identity.Entity.kproj @@ -21,11 +21,16 @@ + + + + - + + - + \ No newline at end of file diff --git a/src/Microsoft.AspNet.Identity.Security/Microsoft.AspNet.Identity.Security.kproj b/src/Microsoft.AspNet.Identity.Security/Microsoft.AspNet.Identity.Security.kproj index 8f0c03bb94..ec8ca0781d 100644 --- a/src/Microsoft.AspNet.Identity.Security/Microsoft.AspNet.Identity.Security.kproj +++ b/src/Microsoft.AspNet.Identity.Security/Microsoft.AspNet.Identity.Security.kproj @@ -21,9 +21,11 @@ + + - + \ No newline at end of file diff --git a/src/Microsoft.AspNet.Identity/IdentityBuilder.cs b/src/Microsoft.AspNet.Identity/IdentityBuilder.cs index 091c14da7c..f74269f5eb 100644 --- a/src/Microsoft.AspNet.Identity/IdentityBuilder.cs +++ b/src/Microsoft.AspNet.Identity/IdentityBuilder.cs @@ -2,6 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using Microsoft.Framework.DependencyInjection; +using Microsoft.Framework.OptionsModel; using System; namespace Microsoft.AspNet.Identity diff --git a/src/Microsoft.AspNet.Identity/IdentityOptionsSetup.cs b/src/Microsoft.AspNet.Identity/IdentityOptionsSetup.cs deleted file mode 100644 index 1a7a920c6d..0000000000 --- a/src/Microsoft.AspNet.Identity/IdentityOptionsSetup.cs +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Open Technologies, Inc. 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.Reflection; -using Microsoft.Framework.ConfigurationModel; -using Microsoft.Framework.DependencyInjection; - -namespace Microsoft.AspNet.Identity -{ - public class IdentityOptionsSetup : IOptionsSetup - { - private readonly IConfiguration _config; - - public IdentityOptionsSetup(IConfiguration config) - { - _config = config; - } - - public int Order { get; set; } - - public void Setup(IdentityOptions options) - { - if (_config != null) - { - ReadProperties(options.ClaimType, _config.GetSubKey("identity:claimtype")); - ReadProperties(options.User, _config.GetSubKey("identity:user")); - ReadProperties(options.Password, _config.GetSubKey("identity:password")); - ReadProperties(options.Lockout, _config.GetSubKey("identity:lockout")); - } - } - - // TODO: Move this somewhere common (Config?) or at least the config.Get conversion - public static void ReadProperties(object obj, IConfiguration config) - { - if (obj == null || config == null) - { - return; - } - var props = obj.GetType().GetTypeInfo().DeclaredProperties; - foreach (var prop in props) - { - if (!prop.CanWrite) - { - continue; - } - var configValue = config.Get(prop.Name); - if (configValue == null) - { - continue; - } - - try - { -// No convert on portable -#if NET45 || K10 - prop.SetValue(obj, Convert.ChangeType(configValue, prop.PropertyType)); -#endif - } - catch - { - // TODO: what do we do about errors? - } - } - } - } -} \ No newline at end of file diff --git a/src/Microsoft.AspNet.Identity/IdentityServiceCollectionExtensions.cs b/src/Microsoft.AspNet.Identity/IdentityServiceCollectionExtensions.cs index f617800add..d85a05a5ea 100644 --- a/src/Microsoft.AspNet.Identity/IdentityServiceCollectionExtensions.cs +++ b/src/Microsoft.AspNet.Identity/IdentityServiceCollectionExtensions.cs @@ -2,12 +2,33 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using Microsoft.AspNet.Identity; +using Microsoft.Framework.OptionsModel; +using Microsoft.Framework.ConfigurationModel; using System; namespace Microsoft.Framework.DependencyInjection { public static class IdentityServiceCollectionExtensions { + public static IdentityBuilder AddIdentity(this ServiceCollection services, IConfiguration identityConfig) + { + services.SetupOptions(identityConfig); + return services.AddIdentity(); + } + + public static IdentityBuilder AddIdentity(this ServiceCollection services) + { + return services.AddIdentity(); + } + + public static IdentityBuilder AddIdentity(this ServiceCollection services, IConfiguration identityConfig) + where TUser : class + where TRole : class + { + services.SetupOptions(identityConfig); + return services.AddIdentity(); + } + public static IdentityBuilder AddIdentity(this ServiceCollection services) where TUser : class where TRole : class @@ -16,8 +37,6 @@ namespace Microsoft.Framework.DependencyInjection services.Add(IdentityServices.GetDefaultRoleServices()); services.AddScoped>(); services.AddScoped>(); - services.AddTransient, IdentityOptionsSetup>(); - services.AddSingleton, OptionsAccessor>(); return new IdentityBuilder(services); } @@ -31,16 +50,38 @@ namespace Microsoft.Framework.DependencyInjection return builder; } + public static IdentityBuilder AddIdentity(this ServiceCollection services, IConfiguration identityConfig, Action> actionBuilder) + where TUser : class + where TRole : class + { + services.AddIdentity(identityConfig); + var builder = new IdentityBuilder(services); + actionBuilder(builder); + return builder; + } + public static IdentityBuilder AddIdentity(this ServiceCollection services) where TUser : class { return services.AddIdentity(); } + public static IdentityBuilder AddIdentity(this ServiceCollection services, IConfiguration identityConfig) + where TUser : class + { + return services.AddIdentity(identityConfig); + } + public static IdentityBuilder AddIdentity(this ServiceCollection services, Action> actionBuilder) where TUser : class { return services.AddIdentity(actionBuilder); } + + public static IdentityBuilder AddIdentity(this ServiceCollection services, IConfiguration identityConfig, Action> actionBuilder) + where TUser : class + { + return services.AddIdentity(identityConfig, actionBuilder); + } } } \ No newline at end of file diff --git a/src/Microsoft.AspNet.Identity/Microsoft.AspNet.Identity.kproj b/src/Microsoft.AspNet.Identity/Microsoft.AspNet.Identity.kproj index 85f59ef799..2a7d8b61e7 100644 --- a/src/Microsoft.AspNet.Identity/Microsoft.AspNet.Identity.kproj +++ b/src/Microsoft.AspNet.Identity/Microsoft.AspNet.Identity.kproj @@ -56,7 +56,6 @@ - @@ -71,4 +70,4 @@ - + \ No newline at end of file diff --git a/src/Microsoft.AspNet.Identity/UserManager.cs b/src/Microsoft.AspNet.Identity/UserManager.cs index 0c2e06752b..d06edbb135 100644 --- a/src/Microsoft.AspNet.Identity/UserManager.cs +++ b/src/Microsoft.AspNet.Identity/UserManager.cs @@ -10,7 +10,7 @@ using System.Text; using System.Threading; using System.Threading.Tasks; using Microsoft.Framework.DependencyInjection; -using Microsoft.Framework.DependencyInjection.Fallback; +using Microsoft.Framework.OptionsModel; namespace Microsoft.AspNet.Identity { diff --git a/src/Microsoft.AspNet.Identity/project.json b/src/Microsoft.AspNet.Identity/project.json index 3e2b993852..e79cab620a 100644 --- a/src/Microsoft.AspNet.Identity/project.json +++ b/src/Microsoft.AspNet.Identity/project.json @@ -5,6 +5,7 @@ "Microsoft.AspNet.Security.DataProtection" : "0.1-alpha-*", "Microsoft.Framework.ConfigurationModel": "0.1-alpha-*", "Microsoft.Framework.DependencyInjection" : "0.1-alpha-*", + "Microsoft.Framework.OptionsModel": "0.1-alpha-*", "System.Security.Claims" : "0.1-alpha-*" }, "configurations": { diff --git a/temp/Identity45.sln b/temp/Identity45.sln index df2329c837..a3dff4a832 100644 --- a/temp/Identity45.sln +++ b/temp/Identity45.sln @@ -3,25 +3,25 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 VisualStudioVersion = 12.0.30408.0 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.Identity.net45", "..\src\Microsoft.AspNet.Identity\Microsoft.AspNet.Identity.net45.csproj", "{FF3ECD18-9F70-4C8F-A052-2CC36E92496F}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.Identity.net45", "..\src\Microsoft.AspNet.Identity\Microsoft.AspNet.Identity.net45.csproj", "{91C0C8AC-F889-4EB9-B4C7-1EB951FC428A}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{31019886-9CDA-4072-B3D9-E513122CECD0}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.Identity.Entity.net45", "..\src\Microsoft.AspNet.Identity.Entity\Microsoft.AspNet.Identity.Entity.net45.csproj", "{B8C12CE9-F3DA-450D-AE52-40014B8F8B53}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.Identity.Entity.net45", "..\src\Microsoft.AspNet.Identity.Entity\Microsoft.AspNet.Identity.Entity.net45.csproj", "{B00CB809-C040-42A4-8AB2-4CFB924DD038}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.Identity.InMemory.net45", "..\src\Microsoft.AspNet.Identity.InMemory\Microsoft.AspNet.Identity.InMemory.net45.csproj", "{2CBC40BC-15EC-45CC-BD23-7FA8FE7F5D43}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.Identity.InMemory.net45", "..\src\Microsoft.AspNet.Identity.InMemory\Microsoft.AspNet.Identity.InMemory.net45.csproj", "{13A0C423-FD34-41B7-AB46-2BB16CF5DC1F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.Identity.Security.net45", "..\src\Microsoft.AspNet.Identity.Security\Microsoft.AspNet.Identity.Security.net45.csproj", "{0C5F4428-383D-4D8F-B99D-5E9686390DB9}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.Identity.Security.net45", "..\src\Microsoft.AspNet.Identity.Security\Microsoft.AspNet.Identity.Security.net45.csproj", "{ADE2B479-1D29-4D63-9B8B-D5E05943C4A8}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{394C0E59-7E24-453E-993C-7B914C62110A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.Identity.Test.net45", "..\test\Microsoft.AspNet.Identity.Test\Microsoft.AspNet.Identity.Test.net45.csproj", "{2F5247A3-BB35-4A0B-BDA7-E5A6630B13A3}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.Identity.Test.net45", "..\test\Microsoft.AspNet.Identity.Test\Microsoft.AspNet.Identity.Test.net45.csproj", "{CD364B81-5435-4EF7-ADE7-B6E02E0B4486}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.Identity.Security.Test.net45", "..\test\Microsoft.AspNet.Identity.Security.Test\Microsoft.AspNet.Identity.Security.Test.net45.csproj", "{7922374C-77B6-4A64-A50C-50F6E31A29A6}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.Identity.Security.Test.net45", "..\test\Microsoft.AspNet.Identity.Security.Test\Microsoft.AspNet.Identity.Security.Test.net45.csproj", "{13883A27-8710-421A-86CE-298E34CE82DD}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.Identity.InMemory.Test.net45", "..\test\Microsoft.AspNet.Identity.InMemory.Test\Microsoft.AspNet.Identity.InMemory.Test.net45.csproj", "{F5A4A5FC-9D4C-492E-9A1C-4F94255A42C9}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.Identity.InMemory.Test.net45", "..\test\Microsoft.AspNet.Identity.InMemory.Test\Microsoft.AspNet.Identity.InMemory.Test.net45.csproj", "{47F00656-3F63-45CD-BBE5-1505CE7938D3}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.Identity.Entity.Test.net45", "..\test\Microsoft.AspNet.Identity.Entity.Test\Microsoft.AspNet.Identity.Entity.Test.net45.csproj", "{B646BB82-C0C9-46F3-9836-6AB456D9ADF9}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.Identity.Entity.Test.net45", "..\test\Microsoft.AspNet.Identity.Entity.Test\Microsoft.AspNet.Identity.Entity.Test.net45.csproj", "{9CDAEF16-DD10-4307-9186-EC70BF8A5AD8}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -33,98 +33,98 @@ Global Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {FF3ECD18-9F70-4C8F-A052-2CC36E92496F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FF3ECD18-9F70-4C8F-A052-2CC36E92496F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FF3ECD18-9F70-4C8F-A052-2CC36E92496F}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {FF3ECD18-9F70-4C8F-A052-2CC36E92496F}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {FF3ECD18-9F70-4C8F-A052-2CC36E92496F}.Debug|x86.ActiveCfg = Debug|Any CPU - {FF3ECD18-9F70-4C8F-A052-2CC36E92496F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FF3ECD18-9F70-4C8F-A052-2CC36E92496F}.Release|Any CPU.Build.0 = Release|Any CPU - {FF3ECD18-9F70-4C8F-A052-2CC36E92496F}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {FF3ECD18-9F70-4C8F-A052-2CC36E92496F}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {FF3ECD18-9F70-4C8F-A052-2CC36E92496F}.Release|x86.ActiveCfg = Release|Any CPU - {B8C12CE9-F3DA-450D-AE52-40014B8F8B53}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B8C12CE9-F3DA-450D-AE52-40014B8F8B53}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B8C12CE9-F3DA-450D-AE52-40014B8F8B53}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {B8C12CE9-F3DA-450D-AE52-40014B8F8B53}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {B8C12CE9-F3DA-450D-AE52-40014B8F8B53}.Debug|x86.ActiveCfg = Debug|Any CPU - {B8C12CE9-F3DA-450D-AE52-40014B8F8B53}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B8C12CE9-F3DA-450D-AE52-40014B8F8B53}.Release|Any CPU.Build.0 = Release|Any CPU - {B8C12CE9-F3DA-450D-AE52-40014B8F8B53}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {B8C12CE9-F3DA-450D-AE52-40014B8F8B53}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {B8C12CE9-F3DA-450D-AE52-40014B8F8B53}.Release|x86.ActiveCfg = Release|Any CPU - {2CBC40BC-15EC-45CC-BD23-7FA8FE7F5D43}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2CBC40BC-15EC-45CC-BD23-7FA8FE7F5D43}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2CBC40BC-15EC-45CC-BD23-7FA8FE7F5D43}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {2CBC40BC-15EC-45CC-BD23-7FA8FE7F5D43}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {2CBC40BC-15EC-45CC-BD23-7FA8FE7F5D43}.Debug|x86.ActiveCfg = Debug|Any CPU - {2CBC40BC-15EC-45CC-BD23-7FA8FE7F5D43}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2CBC40BC-15EC-45CC-BD23-7FA8FE7F5D43}.Release|Any CPU.Build.0 = Release|Any CPU - {2CBC40BC-15EC-45CC-BD23-7FA8FE7F5D43}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {2CBC40BC-15EC-45CC-BD23-7FA8FE7F5D43}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {2CBC40BC-15EC-45CC-BD23-7FA8FE7F5D43}.Release|x86.ActiveCfg = Release|Any CPU - {0C5F4428-383D-4D8F-B99D-5E9686390DB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0C5F4428-383D-4D8F-B99D-5E9686390DB9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0C5F4428-383D-4D8F-B99D-5E9686390DB9}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {0C5F4428-383D-4D8F-B99D-5E9686390DB9}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {0C5F4428-383D-4D8F-B99D-5E9686390DB9}.Debug|x86.ActiveCfg = Debug|Any CPU - {0C5F4428-383D-4D8F-B99D-5E9686390DB9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0C5F4428-383D-4D8F-B99D-5E9686390DB9}.Release|Any CPU.Build.0 = Release|Any CPU - {0C5F4428-383D-4D8F-B99D-5E9686390DB9}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {0C5F4428-383D-4D8F-B99D-5E9686390DB9}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {0C5F4428-383D-4D8F-B99D-5E9686390DB9}.Release|x86.ActiveCfg = Release|Any CPU - {2F5247A3-BB35-4A0B-BDA7-E5A6630B13A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2F5247A3-BB35-4A0B-BDA7-E5A6630B13A3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2F5247A3-BB35-4A0B-BDA7-E5A6630B13A3}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {2F5247A3-BB35-4A0B-BDA7-E5A6630B13A3}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {2F5247A3-BB35-4A0B-BDA7-E5A6630B13A3}.Debug|x86.ActiveCfg = Debug|Any CPU - {2F5247A3-BB35-4A0B-BDA7-E5A6630B13A3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2F5247A3-BB35-4A0B-BDA7-E5A6630B13A3}.Release|Any CPU.Build.0 = Release|Any CPU - {2F5247A3-BB35-4A0B-BDA7-E5A6630B13A3}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {2F5247A3-BB35-4A0B-BDA7-E5A6630B13A3}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {2F5247A3-BB35-4A0B-BDA7-E5A6630B13A3}.Release|x86.ActiveCfg = Release|Any CPU - {7922374C-77B6-4A64-A50C-50F6E31A29A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7922374C-77B6-4A64-A50C-50F6E31A29A6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7922374C-77B6-4A64-A50C-50F6E31A29A6}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {7922374C-77B6-4A64-A50C-50F6E31A29A6}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {7922374C-77B6-4A64-A50C-50F6E31A29A6}.Debug|x86.ActiveCfg = Debug|Any CPU - {7922374C-77B6-4A64-A50C-50F6E31A29A6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7922374C-77B6-4A64-A50C-50F6E31A29A6}.Release|Any CPU.Build.0 = Release|Any CPU - {7922374C-77B6-4A64-A50C-50F6E31A29A6}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {7922374C-77B6-4A64-A50C-50F6E31A29A6}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {7922374C-77B6-4A64-A50C-50F6E31A29A6}.Release|x86.ActiveCfg = Release|Any CPU - {F5A4A5FC-9D4C-492E-9A1C-4F94255A42C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F5A4A5FC-9D4C-492E-9A1C-4F94255A42C9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F5A4A5FC-9D4C-492E-9A1C-4F94255A42C9}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {F5A4A5FC-9D4C-492E-9A1C-4F94255A42C9}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {F5A4A5FC-9D4C-492E-9A1C-4F94255A42C9}.Debug|x86.ActiveCfg = Debug|Any CPU - {F5A4A5FC-9D4C-492E-9A1C-4F94255A42C9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F5A4A5FC-9D4C-492E-9A1C-4F94255A42C9}.Release|Any CPU.Build.0 = Release|Any CPU - {F5A4A5FC-9D4C-492E-9A1C-4F94255A42C9}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {F5A4A5FC-9D4C-492E-9A1C-4F94255A42C9}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {F5A4A5FC-9D4C-492E-9A1C-4F94255A42C9}.Release|x86.ActiveCfg = Release|Any CPU - {B646BB82-C0C9-46F3-9836-6AB456D9ADF9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B646BB82-C0C9-46F3-9836-6AB456D9ADF9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B646BB82-C0C9-46F3-9836-6AB456D9ADF9}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {B646BB82-C0C9-46F3-9836-6AB456D9ADF9}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {B646BB82-C0C9-46F3-9836-6AB456D9ADF9}.Debug|x86.ActiveCfg = Debug|Any CPU - {B646BB82-C0C9-46F3-9836-6AB456D9ADF9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B646BB82-C0C9-46F3-9836-6AB456D9ADF9}.Release|Any CPU.Build.0 = Release|Any CPU - {B646BB82-C0C9-46F3-9836-6AB456D9ADF9}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {B646BB82-C0C9-46F3-9836-6AB456D9ADF9}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {B646BB82-C0C9-46F3-9836-6AB456D9ADF9}.Release|x86.ActiveCfg = Release|Any CPU + {91C0C8AC-F889-4EB9-B4C7-1EB951FC428A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {91C0C8AC-F889-4EB9-B4C7-1EB951FC428A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {91C0C8AC-F889-4EB9-B4C7-1EB951FC428A}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {91C0C8AC-F889-4EB9-B4C7-1EB951FC428A}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {91C0C8AC-F889-4EB9-B4C7-1EB951FC428A}.Debug|x86.ActiveCfg = Debug|Any CPU + {91C0C8AC-F889-4EB9-B4C7-1EB951FC428A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {91C0C8AC-F889-4EB9-B4C7-1EB951FC428A}.Release|Any CPU.Build.0 = Release|Any CPU + {91C0C8AC-F889-4EB9-B4C7-1EB951FC428A}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {91C0C8AC-F889-4EB9-B4C7-1EB951FC428A}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {91C0C8AC-F889-4EB9-B4C7-1EB951FC428A}.Release|x86.ActiveCfg = Release|Any CPU + {B00CB809-C040-42A4-8AB2-4CFB924DD038}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B00CB809-C040-42A4-8AB2-4CFB924DD038}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B00CB809-C040-42A4-8AB2-4CFB924DD038}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {B00CB809-C040-42A4-8AB2-4CFB924DD038}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {B00CB809-C040-42A4-8AB2-4CFB924DD038}.Debug|x86.ActiveCfg = Debug|Any CPU + {B00CB809-C040-42A4-8AB2-4CFB924DD038}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B00CB809-C040-42A4-8AB2-4CFB924DD038}.Release|Any CPU.Build.0 = Release|Any CPU + {B00CB809-C040-42A4-8AB2-4CFB924DD038}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {B00CB809-C040-42A4-8AB2-4CFB924DD038}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {B00CB809-C040-42A4-8AB2-4CFB924DD038}.Release|x86.ActiveCfg = Release|Any CPU + {13A0C423-FD34-41B7-AB46-2BB16CF5DC1F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {13A0C423-FD34-41B7-AB46-2BB16CF5DC1F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {13A0C423-FD34-41B7-AB46-2BB16CF5DC1F}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {13A0C423-FD34-41B7-AB46-2BB16CF5DC1F}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {13A0C423-FD34-41B7-AB46-2BB16CF5DC1F}.Debug|x86.ActiveCfg = Debug|Any CPU + {13A0C423-FD34-41B7-AB46-2BB16CF5DC1F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {13A0C423-FD34-41B7-AB46-2BB16CF5DC1F}.Release|Any CPU.Build.0 = Release|Any CPU + {13A0C423-FD34-41B7-AB46-2BB16CF5DC1F}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {13A0C423-FD34-41B7-AB46-2BB16CF5DC1F}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {13A0C423-FD34-41B7-AB46-2BB16CF5DC1F}.Release|x86.ActiveCfg = Release|Any CPU + {ADE2B479-1D29-4D63-9B8B-D5E05943C4A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ADE2B479-1D29-4D63-9B8B-D5E05943C4A8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ADE2B479-1D29-4D63-9B8B-D5E05943C4A8}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {ADE2B479-1D29-4D63-9B8B-D5E05943C4A8}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {ADE2B479-1D29-4D63-9B8B-D5E05943C4A8}.Debug|x86.ActiveCfg = Debug|Any CPU + {ADE2B479-1D29-4D63-9B8B-D5E05943C4A8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ADE2B479-1D29-4D63-9B8B-D5E05943C4A8}.Release|Any CPU.Build.0 = Release|Any CPU + {ADE2B479-1D29-4D63-9B8B-D5E05943C4A8}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {ADE2B479-1D29-4D63-9B8B-D5E05943C4A8}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {ADE2B479-1D29-4D63-9B8B-D5E05943C4A8}.Release|x86.ActiveCfg = Release|Any CPU + {CD364B81-5435-4EF7-ADE7-B6E02E0B4486}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CD364B81-5435-4EF7-ADE7-B6E02E0B4486}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CD364B81-5435-4EF7-ADE7-B6E02E0B4486}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {CD364B81-5435-4EF7-ADE7-B6E02E0B4486}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {CD364B81-5435-4EF7-ADE7-B6E02E0B4486}.Debug|x86.ActiveCfg = Debug|Any CPU + {CD364B81-5435-4EF7-ADE7-B6E02E0B4486}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CD364B81-5435-4EF7-ADE7-B6E02E0B4486}.Release|Any CPU.Build.0 = Release|Any CPU + {CD364B81-5435-4EF7-ADE7-B6E02E0B4486}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {CD364B81-5435-4EF7-ADE7-B6E02E0B4486}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {CD364B81-5435-4EF7-ADE7-B6E02E0B4486}.Release|x86.ActiveCfg = Release|Any CPU + {13883A27-8710-421A-86CE-298E34CE82DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {13883A27-8710-421A-86CE-298E34CE82DD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {13883A27-8710-421A-86CE-298E34CE82DD}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {13883A27-8710-421A-86CE-298E34CE82DD}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {13883A27-8710-421A-86CE-298E34CE82DD}.Debug|x86.ActiveCfg = Debug|Any CPU + {13883A27-8710-421A-86CE-298E34CE82DD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {13883A27-8710-421A-86CE-298E34CE82DD}.Release|Any CPU.Build.0 = Release|Any CPU + {13883A27-8710-421A-86CE-298E34CE82DD}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {13883A27-8710-421A-86CE-298E34CE82DD}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {13883A27-8710-421A-86CE-298E34CE82DD}.Release|x86.ActiveCfg = Release|Any CPU + {47F00656-3F63-45CD-BBE5-1505CE7938D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {47F00656-3F63-45CD-BBE5-1505CE7938D3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {47F00656-3F63-45CD-BBE5-1505CE7938D3}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {47F00656-3F63-45CD-BBE5-1505CE7938D3}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {47F00656-3F63-45CD-BBE5-1505CE7938D3}.Debug|x86.ActiveCfg = Debug|Any CPU + {47F00656-3F63-45CD-BBE5-1505CE7938D3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {47F00656-3F63-45CD-BBE5-1505CE7938D3}.Release|Any CPU.Build.0 = Release|Any CPU + {47F00656-3F63-45CD-BBE5-1505CE7938D3}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {47F00656-3F63-45CD-BBE5-1505CE7938D3}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {47F00656-3F63-45CD-BBE5-1505CE7938D3}.Release|x86.ActiveCfg = Release|Any CPU + {9CDAEF16-DD10-4307-9186-EC70BF8A5AD8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9CDAEF16-DD10-4307-9186-EC70BF8A5AD8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9CDAEF16-DD10-4307-9186-EC70BF8A5AD8}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {9CDAEF16-DD10-4307-9186-EC70BF8A5AD8}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {9CDAEF16-DD10-4307-9186-EC70BF8A5AD8}.Debug|x86.ActiveCfg = Debug|Any CPU + {9CDAEF16-DD10-4307-9186-EC70BF8A5AD8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9CDAEF16-DD10-4307-9186-EC70BF8A5AD8}.Release|Any CPU.Build.0 = Release|Any CPU + {9CDAEF16-DD10-4307-9186-EC70BF8A5AD8}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {9CDAEF16-DD10-4307-9186-EC70BF8A5AD8}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {9CDAEF16-DD10-4307-9186-EC70BF8A5AD8}.Release|x86.ActiveCfg = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {FF3ECD18-9F70-4C8F-A052-2CC36E92496F} = {31019886-9CDA-4072-B3D9-E513122CECD0} - {B8C12CE9-F3DA-450D-AE52-40014B8F8B53} = {31019886-9CDA-4072-B3D9-E513122CECD0} - {2CBC40BC-15EC-45CC-BD23-7FA8FE7F5D43} = {31019886-9CDA-4072-B3D9-E513122CECD0} - {0C5F4428-383D-4D8F-B99D-5E9686390DB9} = {31019886-9CDA-4072-B3D9-E513122CECD0} - {2F5247A3-BB35-4A0B-BDA7-E5A6630B13A3} = {394C0E59-7E24-453E-993C-7B914C62110A} - {7922374C-77B6-4A64-A50C-50F6E31A29A6} = {394C0E59-7E24-453E-993C-7B914C62110A} - {F5A4A5FC-9D4C-492E-9A1C-4F94255A42C9} = {394C0E59-7E24-453E-993C-7B914C62110A} - {B646BB82-C0C9-46F3-9836-6AB456D9ADF9} = {394C0E59-7E24-453E-993C-7B914C62110A} + {91C0C8AC-F889-4EB9-B4C7-1EB951FC428A} = {31019886-9CDA-4072-B3D9-E513122CECD0} + {B00CB809-C040-42A4-8AB2-4CFB924DD038} = {31019886-9CDA-4072-B3D9-E513122CECD0} + {13A0C423-FD34-41B7-AB46-2BB16CF5DC1F} = {31019886-9CDA-4072-B3D9-E513122CECD0} + {ADE2B479-1D29-4D63-9B8B-D5E05943C4A8} = {31019886-9CDA-4072-B3D9-E513122CECD0} + {CD364B81-5435-4EF7-ADE7-B6E02E0B4486} = {394C0E59-7E24-453E-993C-7B914C62110A} + {13883A27-8710-421A-86CE-298E34CE82DD} = {394C0E59-7E24-453E-993C-7B914C62110A} + {47F00656-3F63-45CD-BBE5-1505CE7938D3} = {394C0E59-7E24-453E-993C-7B914C62110A} + {9CDAEF16-DD10-4307-9186-EC70BF8A5AD8} = {394C0E59-7E24-453E-993C-7B914C62110A} EndGlobalSection EndGlobal diff --git a/test/Microsoft.AspNet.Identity.Entity.Test/InMemoryUserStoreTest.cs b/test/Microsoft.AspNet.Identity.Entity.Test/InMemoryUserStoreTest.cs index fe251ccce8..11273a779b 100644 --- a/test/Microsoft.AspNet.Identity.Entity.Test/InMemoryUserStoreTest.cs +++ b/test/Microsoft.AspNet.Identity.Entity.Test/InMemoryUserStoreTest.cs @@ -5,8 +5,6 @@ using Microsoft.AspNet.Identity.Test; using Microsoft.AspNet.Testing; using Microsoft.Data.Entity; using Microsoft.Data.Entity.Metadata; -using Microsoft.Data.Entity.InMemory; -using Microsoft.Data.Entity.SqlServer; using System; using System.Linq; using System.Security.Claims; @@ -14,6 +12,7 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.Framework.DependencyInjection; using Microsoft.Framework.DependencyInjection.Fallback; +using Microsoft.Framework.OptionsModel; using Xunit; namespace Microsoft.AspNet.Identity.Entity.Test diff --git a/test/Microsoft.AspNet.Identity.Entity.Test/Microsoft.AspNet.Identity.Entity.Test.kproj b/test/Microsoft.AspNet.Identity.Entity.Test/Microsoft.AspNet.Identity.Entity.Test.kproj index b9e01589f1..ccb2a8a66b 100644 --- a/test/Microsoft.AspNet.Identity.Entity.Test/Microsoft.AspNet.Identity.Entity.Test.kproj +++ b/test/Microsoft.AspNet.Identity.Entity.Test/Microsoft.AspNet.Identity.Entity.Test.kproj @@ -21,11 +21,11 @@ - + + - - + \ No newline at end of file diff --git a/test/Microsoft.AspNet.Identity.Entity.Test/SqlUserStoreTest.cs b/test/Microsoft.AspNet.Identity.Entity.Test/SqlUserStoreTest.cs index 3d1393067b..477d81df7a 100644 --- a/test/Microsoft.AspNet.Identity.Entity.Test/SqlUserStoreTest.cs +++ b/test/Microsoft.AspNet.Identity.Entity.Test/SqlUserStoreTest.cs @@ -6,6 +6,7 @@ using Microsoft.AspNet.Identity.Test; using Microsoft.Data.Entity; using Microsoft.Framework.DependencyInjection; using Microsoft.Framework.DependencyInjection.Fallback; +using Microsoft.Framework.OptionsModel; using System; using System.Linq; using System.Security.Claims; diff --git a/test/Microsoft.AspNet.Identity.Entity.Test/StartupTest.cs b/test/Microsoft.AspNet.Identity.Entity.Test/StartupTest.cs index fef7d80c74..33a81269af 100644 --- a/test/Microsoft.AspNet.Identity.Entity.Test/StartupTest.cs +++ b/test/Microsoft.AspNet.Identity.Entity.Test/StartupTest.cs @@ -6,6 +6,7 @@ using Microsoft.AspNet.Identity.Test; using Microsoft.Data.Entity; using Microsoft.Framework.DependencyInjection; using Microsoft.Framework.DependencyInjection.Fallback; +using Microsoft.Framework.OptionsModel; using System; using System.Threading.Tasks; using Xunit; diff --git a/test/Microsoft.AspNet.Identity.Entity.Test/TestIdentityFactory.cs b/test/Microsoft.AspNet.Identity.Entity.Test/TestIdentityFactory.cs index ba520b4cb3..aacccf5283 100644 --- a/test/Microsoft.AspNet.Identity.Entity.Test/TestIdentityFactory.cs +++ b/test/Microsoft.AspNet.Identity.Entity.Test/TestIdentityFactory.cs @@ -1,19 +1,10 @@ // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using Microsoft.AspNet.Testing; using Microsoft.Data.Entity; -using Microsoft.Data.Entity.Metadata; -using Microsoft.Data.Entity.Storage; -using Microsoft.Data.Entity.InMemory; using Microsoft.Framework.DependencyInjection; using Microsoft.Framework.DependencyInjection.Fallback; -using System; -using System.Linq; -using System.Security.Claims; -using System.Threading; -using System.Threading.Tasks; -using Xunit; +using Microsoft.Framework.OptionsModel; namespace Microsoft.AspNet.Identity.Entity.Test { diff --git a/test/Microsoft.AspNet.Identity.Entity.Test/project.json b/test/Microsoft.AspNet.Identity.Entity.Test/project.json index bca9db540c..0730720929 100644 --- a/test/Microsoft.AspNet.Identity.Entity.Test/project.json +++ b/test/Microsoft.AspNet.Identity.Entity.Test/project.json @@ -15,6 +15,7 @@ "Microsoft.Data.Entity.SqlServer": "0.1-alpha-*", "Microsoft.Framework.ConfigurationModel": "0.1-alpha-*", "Microsoft.Framework.DependencyInjection": "0.1-alpha-*", + "Microsoft.Framework.OptionsModel" : "0.1-alpha-*", "Microsoft.Framework.Logging": "0.1-alpha-*", "Remotion.Linq": "1.15.13.0", "System.Security.Claims": "0.1-alpha-*", diff --git a/test/Microsoft.AspNet.Identity.InMemory.Test/InMemoryStoreTest.cs b/test/Microsoft.AspNet.Identity.InMemory.Test/InMemoryStoreTest.cs index e48138dfe1..c5d5a6ea0f 100644 --- a/test/Microsoft.AspNet.Identity.InMemory.Test/InMemoryStoreTest.cs +++ b/test/Microsoft.AspNet.Identity.InMemory.Test/InMemoryStoreTest.cs @@ -1,14 +1,10 @@ // Copyright (c) Microsoft Open Technologies, Inc. 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; -using System.Threading.Tasks; using Microsoft.AspNet.Identity.Test; using Microsoft.Framework.DependencyInjection; using Microsoft.Framework.DependencyInjection.Fallback; +using Microsoft.Framework.OptionsModel; namespace Microsoft.AspNet.Identity.InMemory.Test { diff --git a/test/Microsoft.AspNet.Identity.InMemory.Test/Microsoft.AspNet.Identity.InMemory.Test.kproj b/test/Microsoft.AspNet.Identity.InMemory.Test/Microsoft.AspNet.Identity.InMemory.Test.kproj index 08925a46e8..086b58d15c 100644 --- a/test/Microsoft.AspNet.Identity.InMemory.Test/Microsoft.AspNet.Identity.InMemory.Test.kproj +++ b/test/Microsoft.AspNet.Identity.InMemory.Test/Microsoft.AspNet.Identity.InMemory.Test.kproj @@ -21,9 +21,8 @@ - - + \ No newline at end of file diff --git a/test/Microsoft.AspNet.Identity.InMemory.Test/StartupTest.cs b/test/Microsoft.AspNet.Identity.InMemory.Test/StartupTest.cs index ccfe73ed83..2aa16410b2 100644 --- a/test/Microsoft.AspNet.Identity.InMemory.Test/StartupTest.cs +++ b/test/Microsoft.AspNet.Identity.InMemory.Test/StartupTest.cs @@ -4,11 +4,10 @@ using System; using System.Threading.Tasks; using Microsoft.AspNet.Builder; -using Microsoft.AspNet.Http; using Microsoft.AspNet.Identity.Test; -using Microsoft.AspNet.PipelineCore; using Microsoft.Framework.DependencyInjection; using Microsoft.Framework.DependencyInjection.Fallback; +using Microsoft.Framework.OptionsModel; using Xunit; namespace Microsoft.AspNet.Identity.InMemory.Test diff --git a/test/Microsoft.AspNet.Identity.InMemory.Test/project.json b/test/Microsoft.AspNet.Identity.InMemory.Test/project.json index a5a12b9c4b..ab2873f6a1 100644 --- a/test/Microsoft.AspNet.Identity.InMemory.Test/project.json +++ b/test/Microsoft.AspNet.Identity.InMemory.Test/project.json @@ -9,6 +9,7 @@ "Microsoft.AspNet.Testing" : "0.1-alpha-*", "Microsoft.Framework.ConfigurationModel": "0.1-alpha-*", "Microsoft.Framework.DependencyInjection" : "0.1-alpha-*", + "Microsoft.Framework.OptionsModel" : "0.1-alpha-*", "xunit.abstractions": "2.0.0-aspnet-*", "xunit.assert": "2.0.0-aspnet-*", "xunit.core": "2.0.0-aspnet-*", diff --git a/test/Microsoft.AspNet.Identity.Security.Test/Microsoft.AspNet.Identity.Security.Test.kproj b/test/Microsoft.AspNet.Identity.Security.Test/Microsoft.AspNet.Identity.Security.Test.kproj index 1de4900dc6..25348689af 100644 --- a/test/Microsoft.AspNet.Identity.Security.Test/Microsoft.AspNet.Identity.Security.Test.kproj +++ b/test/Microsoft.AspNet.Identity.Security.Test/Microsoft.AspNet.Identity.Security.Test.kproj @@ -23,7 +23,6 @@ - - + \ No newline at end of file diff --git a/test/Microsoft.AspNet.Identity.Security.Test/project.json b/test/Microsoft.AspNet.Identity.Security.Test/project.json index 8653905c3d..9389776d00 100644 --- a/test/Microsoft.AspNet.Identity.Security.Test/project.json +++ b/test/Microsoft.AspNet.Identity.Security.Test/project.json @@ -14,6 +14,7 @@ "Microsoft.AspNet.Testing" : "0.1-alpha-*", "Microsoft.Framework.ConfigurationModel": "0.1-alpha-*", "Microsoft.Framework.DependencyInjection" : "0.1-alpha-*", + "Microsoft.Framework.OptionsModel" : "0.1-alpha-*", "Microsoft.Framework.Logging" : "0.1-alpha-*", "System.Security.Claims" : "0.1-alpha-*", "xunit.abstractions": "2.0.0-aspnet-*", diff --git a/test/Microsoft.AspNet.Identity.Test/IdentityOptionsTest.cs b/test/Microsoft.AspNet.Identity.Test/IdentityOptionsTest.cs index 20848c97d4..cad5bc7a1c 100644 --- a/test/Microsoft.AspNet.Identity.Test/IdentityOptionsTest.cs +++ b/test/Microsoft.AspNet.Identity.Test/IdentityOptionsTest.cs @@ -7,6 +7,7 @@ using System.Security.Claims; using Microsoft.Framework.ConfigurationModel; using Microsoft.Framework.DependencyInjection; using Microsoft.Framework.DependencyInjection.Fallback; +using Microsoft.Framework.OptionsModel; using Xunit; namespace Microsoft.AspNet.Identity.Test @@ -69,11 +70,8 @@ namespace Microsoft.AspNet.Identity.Test var config = new Configuration { new MemoryConfigurationSource(dic) }; Assert.Equal(roleClaimType, config.Get("identity:claimtype:role")); - var setup = new IdentityOptionsSetup(config); - var services = new ServiceCollection(); - services.AddInstance(config); - services.AddTransient, IdentityOptionsSetup>(); - services.AddTransient, OptionsAccessor>(); + var services = new ServiceCollection {OptionsServices.GetDefaultServices()}; + services.AddIdentity(config.GetSubKey("identity")); var accessor = services.BuildServiceProvider().GetService>(); Assert.NotNull(accessor); var options = accessor.Options; diff --git a/test/Microsoft.AspNet.Identity.Test/UserManagerTest.cs b/test/Microsoft.AspNet.Identity.Test/UserManagerTest.cs index d5cedb32fe..ddec1e1e62 100644 --- a/test/Microsoft.AspNet.Identity.Test/UserManagerTest.cs +++ b/test/Microsoft.AspNet.Identity.Test/UserManagerTest.cs @@ -3,6 +3,7 @@ using Microsoft.Framework.DependencyInjection; using Microsoft.Framework.DependencyInjection.Fallback; +using Microsoft.Framework.OptionsModel; using Moq; using System; using System.Collections.Generic; diff --git a/test/Microsoft.AspNet.Identity.Test/project.json b/test/Microsoft.AspNet.Identity.Test/project.json index 87aabf9bc9..557a1b1b05 100644 --- a/test/Microsoft.AspNet.Identity.Test/project.json +++ b/test/Microsoft.AspNet.Identity.Test/project.json @@ -5,6 +5,7 @@ "Microsoft.AspNet.Testing" : "0.1-alpha-*", "Microsoft.Framework.ConfigurationModel" : "0.1-alpha-*", "Microsoft.Framework.DependencyInjection" : "0.1-alpha-*", + "Microsoft.Framework.OptionsModel" : "0.1-alpha-*", "xunit.abstractions": "2.0.0-aspnet-*", "xunit.assert": "2.0.0-aspnet-*", "xunit.core": "2.0.0-aspnet-*", diff --git a/test/Shared/IdentityConfig.cs b/test/Shared/IdentityConfig.cs index 6a91a87efa..8658131af8 100644 --- a/test/Shared/IdentityConfig.cs +++ b/test/Shared/IdentityConfig.cs @@ -2,7 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using Microsoft.Framework.DependencyInjection; +using Microsoft.Framework.OptionsModel; namespace Microsoft.AspNet.Identity.Test { diff --git a/test/Shared/MockHelpers.cs b/test/Shared/MockHelpers.cs index e0625151a7..443a1ae06c 100644 --- a/test/Shared/MockHelpers.cs +++ b/test/Shared/MockHelpers.cs @@ -5,6 +5,7 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.Framework.DependencyInjection; using Microsoft.Framework.DependencyInjection.Fallback; +using Microsoft.Framework.OptionsModel; using Moq; namespace Microsoft.AspNet.Identity.Test diff --git a/test/Shared/UserManagerTestBase.cs b/test/Shared/UserManagerTestBase.cs index 43457a3f11..f3020e3ace 100644 --- a/test/Shared/UserManagerTestBase.cs +++ b/test/Shared/UserManagerTestBase.cs @@ -6,10 +6,8 @@ using System.Linq; using System.Security.Claims; using System.Threading; using System.Threading.Tasks; -using Microsoft.AspNet.Identity.Test; using Microsoft.AspNet.Testing; -using Microsoft.Framework.DependencyInjection; -using Microsoft.Framework.DependencyInjection.Fallback; +using Microsoft.Framework.OptionsModel; using Xunit; namespace Microsoft.AspNet.Identity.Test