removes remaining back office things from underlying UmbracoUserManager moves files
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Specialized;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
@@ -6,10 +6,9 @@ using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Newtonsoft.Json;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.BackOffice;
|
||||
using Umbraco.Core.Configuration;
|
||||
using Umbraco.Core.Configuration.Models;
|
||||
using Umbraco.Core.Migrations.Install;
|
||||
using Umbraco.Core.Security;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Extensions;
|
||||
using Umbraco.Web.Install.Models;
|
||||
|
||||
@@ -6,7 +6,7 @@ using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Umbraco.Core.Security;
|
||||
|
||||
namespace Umbraco.Core.BackOffice
|
||||
namespace Umbraco.Core.Security
|
||||
{
|
||||
/// <summary>
|
||||
/// A <see cref="UserClaimsPrincipalFactory{TUser}" for the back office/>
|
||||
@@ -1,19 +1,25 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Umbraco.Core.BackOffice;
|
||||
using Umbraco.Core.Security;
|
||||
|
||||
namespace Umbraco.Infrastructure.BackOffice
|
||||
namespace Umbraco.Core.Security
|
||||
{
|
||||
public class BackOfficeIdentityBuilder : IdentityBuilder
|
||||
{
|
||||
public BackOfficeIdentityBuilder(IServiceCollection services) : base(typeof(BackOfficeIdentityUser), services)
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="BackOfficeIdentityBuilder"/> class.
|
||||
/// </summary>
|
||||
public BackOfficeIdentityBuilder(IServiceCollection services)
|
||||
: base(typeof(BackOfficeIdentityUser), services)
|
||||
{
|
||||
}
|
||||
|
||||
public BackOfficeIdentityBuilder(Type role, IServiceCollection services) : base(typeof(BackOfficeIdentityUser), role, services)
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="BackOfficeIdentityBuilder"/> class.
|
||||
/// </summary>
|
||||
public BackOfficeIdentityBuilder(Type role, IServiceCollection services)
|
||||
: base(typeof(BackOfficeIdentityUser), role, services)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -29,10 +35,8 @@ namespace Umbraco.Infrastructure.BackOffice
|
||||
{
|
||||
throw new InvalidOperationException($"Invalid Type for TokenProvider: {provider.FullName}");
|
||||
}
|
||||
Services.Configure<BackOfficeIdentityOptions>(options =>
|
||||
{
|
||||
options.Tokens.ProviderMap[providerName] = new TokenProviderDescriptor(provider);
|
||||
});
|
||||
|
||||
Services.Configure<BackOfficeIdentityOptions>(options => options.Tokens.ProviderMap[providerName] = new TokenProviderDescriptor(provider));
|
||||
Services.AddTransient(provider);
|
||||
return this;
|
||||
}
|
||||
@@ -1,11 +1,12 @@
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
|
||||
namespace Umbraco.Core.BackOffice
|
||||
namespace Umbraco.Core.Security
|
||||
{
|
||||
/// <summary>
|
||||
/// Umbraco back office specific <see cref="IdentityErrorDescriber"/>
|
||||
/// </summary>
|
||||
public class BackOfficeIdentityErrorDescriber : IdentityErrorDescriber
|
||||
{
|
||||
// TODO: Override all the methods in order to provide our own translated error messages
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
|
||||
namespace Umbraco.Core.BackOffice
|
||||
namespace Umbraco.Core.Security
|
||||
{
|
||||
/// <summary>
|
||||
/// Identity options specifically for the back office identity implementation
|
||||
@@ -1,6 +1,6 @@
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
|
||||
namespace Umbraco.Core.BackOffice
|
||||
namespace Umbraco.Core.Security
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
@@ -8,6 +8,8 @@ namespace Umbraco.Core.BackOffice
|
||||
/// </summary>
|
||||
public class BackOfficeLookupNormalizer : ILookupNormalizer
|
||||
{
|
||||
// TODO: Do we need this?
|
||||
|
||||
public string NormalizeName(string name) => name;
|
||||
|
||||
public string NormalizeEmail(string email) => email;
|
||||
@@ -15,7 +15,7 @@ using Umbraco.Core.Scoping;
|
||||
using Umbraco.Core.Security;
|
||||
using Umbraco.Core.Services;
|
||||
|
||||
namespace Umbraco.Core.BackOffice
|
||||
namespace Umbraco.Core.Security
|
||||
{
|
||||
// TODO: Make this into a base class that can be re-used
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Umbraco.Core.Security;
|
||||
|
||||
namespace Umbraco.Core.BackOffice
|
||||
namespace Umbraco.Core.Security
|
||||
{
|
||||
public class BackOfficeUserValidator<T> : UserValidator<T>
|
||||
where T : BackOfficeIdentityUser
|
||||
@@ -1,6 +1,6 @@
|
||||
using Umbraco.Core.Security;
|
||||
|
||||
namespace Umbraco.Core.BackOffice
|
||||
namespace Umbraco.Core.Security
|
||||
{
|
||||
/// <summary>
|
||||
/// The user manager for the back office
|
||||
@@ -8,7 +8,7 @@ using Umbraco.Core.Models.Membership;
|
||||
using Umbraco.Core.Security;
|
||||
using Umbraco.Web.Models.ContentEditing;
|
||||
|
||||
namespace Umbraco.Core.BackOffice
|
||||
namespace Umbraco.Core.Security
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
|
||||
namespace Umbraco.Core.BackOffice
|
||||
namespace Umbraco.Core.Security
|
||||
{
|
||||
/// <summary>
|
||||
/// An IUserStore interface part to implement if the store supports validating user session Ids
|
||||
@@ -1,6 +1,6 @@
|
||||
using Umbraco.Core.Security;
|
||||
using Umbraco.Core.Security;
|
||||
|
||||
namespace Umbraco.Core.BackOffice
|
||||
namespace Umbraco.Core.Security
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using Umbraco.Core.Models.Membership;
|
||||
using Umbraco.Core.Models.Membership;
|
||||
using Umbraco.Core.Security;
|
||||
using Umbraco.Web.Models.ContentEditing;
|
||||
|
||||
namespace Umbraco.Core.BackOffice
|
||||
namespace Umbraco.Core.Security
|
||||
{
|
||||
public class UserInviteEventArgs : IdentityAuditEventArgs
|
||||
{
|
||||
@@ -25,7 +25,7 @@ namespace Umbraco.Core.BackOffice
|
||||
|
||||
/// <summary>
|
||||
/// The local user that has been created that is pending the invite
|
||||
/// </summary>
|
||||
/// </summary>
|
||||
public IUser User { get; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user