Remove UmbracoBackOfficeIdentity

This commit is contained in:
Mole
2021-02-17 14:21:59 +01:00
parent b9d61f3ad8
commit 8ba3f7ccb4
5 changed files with 5 additions and 20 deletions

View File

@@ -1,16 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Claims;
namespace Umbraco.Core.Security
{
/// <summary>
/// A custom user identity for the Umbraco backoffice
/// </summary>
[Serializable]
public class UmbracoBackOfficeIdentity : ClaimsIdentity
{
}
}

View File

@@ -26,7 +26,7 @@ namespace Umbraco.Core.Security
/// <inheritdoc />
/// <remarks>
/// Returns a custom <see cref="UmbracoBackOfficeIdentity"/> and allows flowing claims from the external identity
/// Returns a ClaimsIdentity that has the required claims, and allows flowing of claims from external identity
/// </remarks>
public override async Task<ClaimsPrincipal> CreateAsync(BackOfficeIdentityUser user)
{

View File

@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Security.Claims;
using System.Web;
using System.Web.Http;
using System.Web.Http.Controllers;
@@ -93,7 +94,7 @@ namespace Umbraco.Tests.TestHelpers.ControllerTesting
//chuck it into the props since this is what MS does when hosted and it's needed there
request.Properties["MS_HttpContext"] = httpContext;
var backofficeIdentity = (UmbracoBackOfficeIdentity) owinContext.Authentication.User.Identity;
var backofficeIdentity = (ClaimsIdentity) owinContext.Authentication.User.Identity;
var backofficeSecurity = new Mock<IBackOfficeSecurity>();

View File

@@ -112,7 +112,7 @@ namespace Umbraco.Web.BackOffice.Filters
return;
}
var identity = actionContext.HttpContext.User.Identity as UmbracoBackOfficeIdentity;
var identity = actionContext.HttpContext.User.Identity as ClaimsIdentity;
if (identity == null)
{
return;

View File

@@ -9,7 +9,7 @@ namespace Umbraco.Web.BackOffice.Security
{
/// <summary>
/// Custom secure format that ensures the Identity in the ticket is <see cref="UmbracoBackOfficeIdentity"/> and not just a ClaimsIdentity
/// Custom secure format that ensures the Identity in the ticket is verified <see cref="ClaimsIdentity"/>
/// </summary>
internal class BackOfficeSecureDataFormat : ISecureDataFormat<AuthenticationTicket>
{