Corrected formatting and removed unwanted commented out code

This commit is contained in:
Emma Garland
2021-03-08 17:26:53 +00:00
parent 1df78c1321
commit 1a7bc6aa75

View File

@@ -63,24 +63,15 @@ namespace Umbraco.Extensions
/// <summary>
/// Adds the services required for using Members Identity
/// </summary>
public static void AddMembersIdentity(this IServiceCollection services)
{
public static void AddMembersIdentity(this IServiceCollection services) =>
services.BuildMembersIdentity()
.AddDefaultTokenProviders()
.AddMemberManager<IMemberManager, MemberManager>()
//.AddRoles<IdentityRole>()
.AddUserStore<MemberUserStore>()
.AddRoleStore<MemberRoleStore<IdentityRole>>()
.AddRoleValidator<RoleValidator<IdentityRole>>()
.AddRoleManager<RoleManager<IdentityRole>>();
//services.AddScoped<IUserClaimsPrincipalFactory<MemberIdentityUser>>(
// s => new UserClaimsPrincipalFactory<MemberIdentityUser, IdentityRole>(
// s.GetService<MemberManager>(),
// s.GetService<RoleManager<IdentityRole>>(),
// s.GetService<IOptions<IdentityOptions>>()));
}
private static MemberIdentityBuilder BuildMembersIdentity(this IServiceCollection services)
{
// Services used by Umbraco members identity