Skip to content

Commit

Permalink
Merge branch 'hotfix/0.3.2.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
ADAS-antonio-calatayud committed Jul 30, 2021
2 parents d58db4e + 9994988 commit 8770d7c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion H2020.IPMDecisions.IDP.API/Extensions/ServiceExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public static void ConfigureMySqlContext(this IServiceCollection services, IConf
});
}

public static void ConfigureIdentity(this IServiceCollection services)
public static void ConfigureIdentity(this IServiceCollection services, IConfiguration config)
{
services.AddIdentity<ApplicationUser, IdentityRole>()
.AddEntityFrameworkStores<ApplicationDbContext>()
Expand All @@ -66,6 +66,9 @@ public static void ConfigureIdentity(this IServiceCollection services)
options.User.RequireUniqueEmail = true;
});

services.Configure<DataProtectionTokenProviderOptions>(options =>
options.TokenLifespan = TimeSpan.FromHours(int.Parse(config["EmailConfirmationAllowanceHours"])));
}

public static void ConfigureJwtAuthentication(this IServiceCollection services, IConfiguration config)
Expand Down
2 changes: 1 addition & 1 deletion H2020.IPMDecisions.IDP.API/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public void ConfigureServices(IServiceCollection services)
services.ConfigureCors(Configuration);
services.ConfigureContentNegotiation();

services.ConfigureIdentity();
services.ConfigureIdentity(Configuration);
services.ConfigureJwtAuthentication(Configuration);
services.ConfigureInternalCommunicationHttpService(Configuration);

Expand Down

0 comments on commit 8770d7c

Please sign in to comment.