/
githubmirror
/
aspnetcore
Обзор
Документация
Войти
/
githubmirror
/
aspnetcore
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Identity/testassets/Identity.DefaultUI.WebSite/PocoUserStartup.cs
31 строка
1 KB
Shreyas Jejurkar
chore : Remove unwanted `using` statement (#39176)
02 янв 2022, 17:39
Не верифицирован
02 янв 2022, 17:39
c85baf8
Код
Авторство
О чём код?
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Identity.EntityFrameworkCore; using Microsoft.AspNetCore.Identity.InMemory; namespace Identity.DefaultUI.WebSite; public class PocoUserStartup : StartupBase<PocoUser, IdentityDbContext> { public PocoUserStartup(IConfiguration configuration) : base(configuration) { } public override void ConfigureServices(IServiceCollection services) { services.Configure<CookiePolicyOptions>(options => { // This lambda determines whether user consent for non-essential cookies is needed for a given request. options.CheckConsentNeeded = context => true; }); services.AddDefaultIdentity<Microsoft.AspNetCore.Identity.Test.PocoUser>() .AddUserManager<UserManager<Microsoft.AspNetCore.Identity.Test.PocoUser>>(); services.AddSingleton<IUserStore<Microsoft.AspNetCore.Identity.Test.PocoUser>, InMemoryUserStore<Microsoft.AspNetCore.Identity.Test.PocoUser>>(); services.AddMvc() .AddNewtonsoftJson(); } }