Remove UmbracoBackOfficeIdentity
This commit is contained in:
@@ -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
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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>();
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user