Fixes setting auth cookie during install, removes some try/catch/swallow with some error messaging, converts some String -> string and == false updates.

This commit is contained in:
Shannon
2015-11-26 13:07:22 +01:00
parent 8e50f4968f
commit fd66f08520
9 changed files with 93 additions and 25 deletions

View File

@@ -50,14 +50,14 @@ namespace Umbraco.Web.Security
/// This will set a an authenticated IPrincipal to the current request given the IUser object
/// </summary>
/// <param name="httpContext"></param>
/// <param name="user"></param>
/// <param name="userData"></param>
/// <returns></returns>
internal static IPrincipal SetPrincipalForRequest(this HttpContextBase httpContext, IUser user)
internal static IPrincipal SetPrincipalForRequest(this HttpContextBase httpContext, UserData userData)
{
var principal = new ClaimsPrincipal(
new UmbracoBackOfficeIdentity(
new ClaimsIdentity(),
Mapper.Map<UserData>(user)));
userData));
//It is actually not good enough to set this on the current app Context and the thread, it also needs
// to be set explicitly on the HttpContext.Current !! This is a strange web api thing that is actually