More signinmanager, signin now works and we set the user principal in the correct place on login

This commit is contained in:
Shannon
2020-05-27 18:27:49 +10:00
parent e47f81efdc
commit 1cfc490751
11 changed files with 179 additions and 77 deletions

View File

@@ -21,6 +21,12 @@ namespace Umbraco.Extensions
public static void AddUmbracoBackOffice(this IServiceCollection services)
{
services.AddAntiforgery();
services
.AddAuthentication(Constants.Security.BackOfficeAuthenticationType)
.AddCookie(Constants.Security.BackOfficeAuthenticationType);
services.ConfigureOptions<ConfigureUmbracoBackOfficeCookieOptions>();
}
/// <summary>
@@ -42,12 +48,7 @@ namespace Umbraco.Extensions
// Configure the options specifically for the UmbracoBackOfficeIdentityOptions instance
services.ConfigureOptions<ConfigureUmbracoBackOfficeIdentityOptions>();
//services.TryAddScoped<ISecurityStampValidator, SecurityStampValidator<BackOfficeIdentityUser>>();
services
.AddAuthentication(Constants.Security.BackOfficeAuthenticationType)
.AddCookie(Constants.Security.BackOfficeAuthenticationType);
services.ConfigureOptions<ConfigureUmbracoBackOfficeCookieOptions>();
//services.TryAddScoped<ISecurityStampValidator, SecurityStampValidator<BackOfficeIdentityUser>>();
}
private static IdentityBuilder BuildUmbracoBackOfficeIdentity(this IServiceCollection services)