|
|
@ -105,16 +105,23 @@ public class AppBootstrap(IConfiguration configuration)
|
|
|
|
services.AddIdentityApiEndpoints<AthleteEntity>()
|
|
|
|
services.AddIdentityApiEndpoints<AthleteEntity>()
|
|
|
|
.AddEntityFrameworkStores<TrainingStubbedContext>();*/
|
|
|
|
.AddEntityFrameworkStores<TrainingStubbedContext>();*/
|
|
|
|
|
|
|
|
|
|
|
|
services.AddIdentity<AthleteEntity, IdentityRole<int>>(options =>
|
|
|
|
var identityBuilder = services.AddIdentity<AthleteEntity, IdentityRole<int>>(options =>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
options.Password.RequireDigit = true;
|
|
|
|
options.Password.RequireDigit = true;
|
|
|
|
options.Password.RequireLowercase = true;
|
|
|
|
options.Password.RequireLowercase = true;
|
|
|
|
options.Password.RequireUppercase = true;
|
|
|
|
options.Password.RequireUppercase = true;
|
|
|
|
options.Password.RequireNonAlphanumeric = true;
|
|
|
|
options.Password.RequireNonAlphanumeric = true;
|
|
|
|
options.Password.RequiredLength = 8;
|
|
|
|
options.Password.RequiredLength = 8;
|
|
|
|
})
|
|
|
|
});
|
|
|
|
.AddEntityFrameworkStores<TrainingStubbedContext>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (Environment.GetEnvironmentVariable("TYPE") == "BDD")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
identityBuilder.AddEntityFrameworkStores<HeartTrackContext>();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
identityBuilder.AddEntityFrameworkStores<TrainingStubbedContext>();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
services.AddAuthentication(options =>
|
|
|
|
services.AddAuthentication(options =>
|
|
|
|
{
|
|
|
|
{
|
|
|
|