diff --git a/build/NuSpecs/UmbracoCms.Core.nuspec b/build/NuSpecs/UmbracoCms.Core.nuspec index f67b85be28..7865c17d19 100644 --- a/build/NuSpecs/UmbracoCms.Core.nuspec +++ b/build/NuSpecs/UmbracoCms.Core.nuspec @@ -17,7 +17,6 @@ - diff --git a/src/Umbraco.Core/Security/AuthenticationExtensions.cs b/src/Umbraco.Core/Security/AuthenticationExtensions.cs index 79fdc1bed1..b8064474bb 100644 --- a/src/Umbraco.Core/Security/AuthenticationExtensions.cs +++ b/src/Umbraco.Core/Security/AuthenticationExtensions.cs @@ -167,74 +167,18 @@ namespace Umbraco.Core.Security /// This clears the forms authentication cookie for webapi since cookies are handled differently /// /// - [Obsolete("Use OWIN IAuthenticationManager.SignOut instead")] + [Obsolete("Use OWIN IAuthenticationManager.SignOut instead", true)] [EditorBrowsable(EditorBrowsableState.Never)] public static void UmbracoLogoutWebApi(this HttpResponseMessage response) { - if (response == null) throw new ArgumentNullException("response"); - //remove the cookie - var authCookie = new CookieHeaderValue(UmbracoConfig.For.UmbracoSettings().Security.AuthCookieName, "") - { - Expires = DateTime.Now.AddYears(-1), - Path = "/" - }; - //remove the preview cookie too - var prevCookie = new CookieHeaderValue(Constants.Web.PreviewCookieName, "") - { - Expires = DateTime.Now.AddYears(-1), - Path = "/" - }; - //remove the external login cookie too - var extLoginCookie = new CookieHeaderValue(Constants.Security.BackOfficeExternalCookieName, "") - { - Expires = DateTime.Now.AddYears(-1), - Path = "/" - }; - - response.Headers.AddCookies(new[] { authCookie, prevCookie, extLoginCookie }); + throw new NotSupportedException("This method is not supported and should not be used, it has been removed in Umbraco 7.4"); } - [Obsolete("Use WebSecurity.SetPrincipalForRequest")] + [Obsolete("Use WebSecurity.SetPrincipalForRequest", true)] [EditorBrowsable(EditorBrowsableState.Never)] public static FormsAuthenticationTicket UmbracoLoginWebApi(this HttpResponseMessage response, IUser user) { - if (response == null) throw new ArgumentNullException("response"); - - //remove the external login cookie - var extLoginCookie = new CookieHeaderValue(Constants.Security.BackOfficeExternalCookieName, "") - { - Expires = DateTime.Now.AddYears(-1), - Path = "/" - }; - - var userDataString = JsonConvert.SerializeObject(Mapper.Map(user)); - - var ticket = new FormsAuthenticationTicket( - 4, - user.Username, - DateTime.Now, - DateTime.Now.AddMinutes(GlobalSettings.TimeOutInMinutes), - true, - userDataString, - "/" - ); - - // Encrypt the cookie using the machine key for secure transport - var encrypted = FormsAuthentication.Encrypt(ticket); - - //add the cookie - var authCookie = new CookieHeaderValue(UmbracoConfig.For.UmbracoSettings().Security.AuthCookieName, encrypted) - { - //Umbraco has always persisted it's original cookie for 1 day so we'll keep it that way - Expires = DateTime.Now.AddMinutes(1440), - Path = "/", - Secure = GlobalSettings.UseSSL, - HttpOnly = true - }; - - response.Headers.AddCookies(new[] { authCookie, extLoginCookie }); - - return ticket; + throw new NotSupportedException("This method is not supported and should not be used, it has been removed in Umbraco 7.4"); } /// diff --git a/src/Umbraco.Core/Services/EntityXmlSerializer.cs b/src/Umbraco.Core/Services/EntityXmlSerializer.cs index 69c6708496..00bc7c5a9b 100644 --- a/src/Umbraco.Core/Services/EntityXmlSerializer.cs +++ b/src/Umbraco.Core/Services/EntityXmlSerializer.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Generic; using System.Globalization; using System.Linq; -using System.Net.Http.Formatting; using System.Web; using System.Xml; using System.Xml.Linq; diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index cee2f8ee3f..03114ed0f1 100644 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -112,18 +112,6 @@ - - ..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Extensions.dll - True - - - ..\packages\Microsoft.AspNet.WebApi.Client.4.0.30506.0\lib\net40\System.Net.Http.Formatting.dll - False - - - ..\packages\Microsoft.Net.Http.2.2.29\lib\net45\System.Net.Http.Primitives.dll - True - @@ -1414,7 +1402,9 @@ - + + Designer + @@ -1430,11 +1420,6 @@ - - - - -