зеркало из https://github.com/aspnet/Identity.git
Update Identity to account for DataProtection changes.
This commit is contained in:
Родитель
121d0b1acf
Коммит
0a91227a4d
|
@ -101,8 +101,9 @@ namespace Microsoft.Framework.DependencyInjection
|
|||
new DataProtectionTokenProviderOptions
|
||||
{
|
||||
Name = Resources.DefaultTokenProvider,
|
||||
},
|
||||
DataProtectionProvider.CreateFromDpapi().CreateProtector("ASP.NET Identity")))
|
||||
},
|
||||
// TODO: This needs to get IDataProtectionProvider from the environment
|
||||
new EphemeralDataProtectionProvider().CreateProtector("ASP.NET Identity")))
|
||||
.AddTokenProvider(new PhoneNumberTokenProvider<TUser>())
|
||||
.AddTokenProvider(new EmailTokenProvider<TUser>());
|
||||
}
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
"dependencies": {
|
||||
"Microsoft.AspNet.Http" : "1.0.0-*",
|
||||
"Microsoft.AspNet.Security" : "1.0.0-*",
|
||||
"Microsoft.AspNet.Security.Cookies" : "1.0.0-*",
|
||||
"Microsoft.AspNet.Security.Cookies": "1.0.0-*",
|
||||
"Microsoft.AspNet.Security.DataProtection": "1.0.0-*",
|
||||
"Microsoft.Framework.ConfigurationModel": "1.0.0-*",
|
||||
"Microsoft.Framework.DependencyInjection" : "1.0.0-*",
|
||||
"Microsoft.Framework.OptionsModel": "1.0.0-*",
|
||||
|
|
|
@ -552,7 +552,7 @@ namespace Microsoft.AspNet.Identity.Test
|
|||
{
|
||||
var manager = CreateManager();
|
||||
manager.RegisterTokenProvider(new DataProtectorTokenProvider<TUser>(new DataProtectionTokenProviderOptions(),
|
||||
DataProtectionProvider.CreateFromDpapi().CreateProtector("ASP.NET Identity")));
|
||||
new EphemeralDataProtectionProvider().CreateProtector("ASP.NET Identity")));
|
||||
manager.Options.EmailConfirmationTokenProvider = "DataProtection";
|
||||
var user = new TUser() { UserName = "test" };
|
||||
Assert.False(user.EmailConfirmed);
|
||||
|
|
Загрузка…
Ссылка в новой задаче