public static void SetCurrentPrincipal(KmsPrincipal principal) { Thread.CurrentPrincipal = principal; if (HttpContext.Current != null) { HttpContext.Current.User = principal; } }
/// <summary> /// Devuelve el objeto de Identidad que ostenta el Principal del Thread actual. /// </summary> public static KmsIdentity GetCurrentPrincipalIdentity() { return(KmsPrincipal.CurrentPrincipal().Identity as KmsIdentity); }
public void SetAsCurrent() { KmsPrincipal.SetCurrentPrincipal(this); }