internal void BindUser(UserPrincipal user) { if (user == null) { throw new ArgumentNullException("user"); } this.user = user; }
internal void InitUser(ITicket ticket, int orgId, int deviceId, Dictionary<string, object> extendProperties) { if (this.user == UserPrincipal.Guest || this.user == UserPrincipal.LocalSystem || this.user == null) { this.user = UserPrincipal.FromTicket(ticket, orgId, deviceId, extendProperties); } }
public void ResetUser(UserIdentity identity, int deviceId, Dictionary<string, object> extendProperties) { this.user = UserPrincipal.FromIdentity(identity, deviceId, extendProperties); }
/// <summary> /// /// </summary> /// <param name="httpContext"></param> /// <param name="operationContext"></param> private SecurityContext(HttpContext httpContext, OperationContext operationContext) { this.user = UserPrincipal.GetFromRequest(httpContext, operationContext); this.ip = GetUserIPFromRequest(httpContext, operationContext); this.appAgent = AppAgent.GetFromRequest(httpContext, operationContext); this.invokeChain = ServiceInvokeChain.GetFromRequest(httpContext, operationContext); }