Merge remote-tracking branch 'origin/netcore/netcore' into netcore/feature/get-remaining-seconds

This commit is contained in:
Bjarke Berg
2020-06-11 13:48:20 +02:00
45 changed files with 641 additions and 626 deletions

View File

@@ -37,7 +37,7 @@ namespace Umbraco.Extensions
/// <summary>
/// Adds the services required for using Umbraco back office Identity
/// </summary>
/// <param name="services"></param>
/// <param name="services"></param>
public static void AddUmbracoBackOfficeIdentity(this IServiceCollection services)
{
services.AddDataProtection();
@@ -54,14 +54,14 @@ namespace Umbraco.Extensions
// Configure the options specifically for the UmbracoBackOfficeIdentityOptions instance
services.ConfigureOptions<ConfigureBackOfficeIdentityOptions>();
services.ConfigureOptions<ConfigureBackOfficeSecurityStampValidatorOptions>();
}
}
private static IdentityBuilder BuildUmbracoBackOfficeIdentity(this IServiceCollection services)
{
// Borrowed from https://github.com/dotnet/aspnetcore/blob/master/src/Identity/Extensions.Core/src/IdentityServiceCollectionExtensions.cs#L33
// The reason we need our own is because the Identity system doesn't cater easily for multiple identity systems and particularly being
// able to configure IdentityOptions to a specific provider since there is no named options. So we have strongly typed options
// and strongly typed ILookupNormalizer and IdentityErrorDescriber since those are 'global' and we need to be unintrusive.
// and strongly typed ILookupNormalizer and IdentityErrorDescriber since those are 'global' and we need to be unintrusive.
// TODO: Could move all of this to BackOfficeComposer?
@@ -76,7 +76,7 @@ namespace Umbraco.Extensions
services.TryAddScoped<IUserClaimsPrincipalFactory<BackOfficeIdentityUser>, UserClaimsPrincipalFactory<BackOfficeIdentityUser>>();
services.TryAddScoped<UserManager<BackOfficeIdentityUser>>();
// CUSTOM:
// CUSTOM:
services.TryAddScoped<BackOfficeLookupNormalizer>();
services.TryAddScoped<BackOfficeIdentityErrorDescriber>();