Initial DI attempt
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Umbraco.Core.Mapping;
|
||||
using Umbraco.Web.BackOffice.Identity;
|
||||
|
||||
namespace Umbraco.Extensions
|
||||
{
|
||||
public static class UmbracoBackOfficeServiceCollectionExtensions
|
||||
{
|
||||
public static void AddUmbracoBackOfficeIdentity(this IServiceCollection services)
|
||||
{
|
||||
services.AddIdentity<BackOfficeIdentityUser, IdentityRole>()
|
||||
.AddDefaultTokenProviders()
|
||||
.AddUserStore<BackOfficeUserStore>();
|
||||
|
||||
// .AddClaimsPrincipalFactory<UserClaimsPrincipalFactory<BackOfficeIdentityUser, IdentityRole>>() // TODO: extract custom claims principal factory
|
||||
// .AddUserManager<BackOfficeUserManager<BackOfficeIdentityUser>>()
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user