// Token: 0x0600073F RID: 1855 RVA: 0x000383F0 File Offset: 0x000365F0 internal override bool FilterRequest(object source, EventArgs e, RequestEventType eventType) { HttpApplication httpApplication = (HttpApplication)source; HttpContext context = httpApplication.Context; return(AlternateMailboxFilterChain.FilterAlternateRequest(context)); }
/// <summary> /// 获取事件类型 /// </summary> /// <param name="jObject"></param> /// <returns></returns> public static RequestEventType GetRequestEventType(JObject jObject) { string eventstr = (string)jObject["Event"][CDATA_KEY]; nlog.Info(eventstr); RequestEventType eventType = (RequestEventType)Enum.Parse(typeof(RequestEventType), eventstr, true); nlog.Info(eventType.ToString()); return(eventType); }
// Token: 0x0600073B RID: 1851 RVA: 0x00038254 File Offset: 0x00036454 internal bool ExecuteRequestFilterChain(object source, EventArgs e, RequestEventType eventType) { bool flag = this.FilterRequest(source, e, eventType); if (!flag && this.Next != null) { flag = this.Next.ExecuteRequestFilterChain(source, e, eventType); } return(flag); }
internal override bool FilterRequest(object source, EventArgs e, RequestEventType eventType) { HttpApplication httpApplication = (HttpApplication)source; HttpContext context = httpApplication.Context; HttpRequest request = context.Request; Configuration configuration = OwaConfigurationManager.Configuration; if (!Utilities.IsOwaUrl(request.Url, OwaUrl.AuthPost, true) || configuration == null) { return(false); } if (configuration.FormsAuthenticationEnabled) { if (eventType == RequestEventType.BeginRequest) { this.SimulateBasicAuthenticationHeader(context); } else { if (eventType != RequestEventType.PostAuthorizeRequest) { throw new OwaInvalidOperationException("FBASingleSignOn was unexpectedly called"); } HttpResponse response = context.Response; WindowsIdentity windowsIdentity = context.User.Identity as WindowsIdentity; if (windowsIdentity != null && !windowsIdentity.IsAnonymous) { this.TransferToAuthDll(httpApplication); return(true); } OwaDiagnostics.LogEvent(ClientsEventLogConstants.Tuple_WebConfigAuthenticationIncorrect, string.Empty, new object[] { HttpRuntime.AppDomainAppPath }); Utilities.RewritePathToError(OwaContext.Current, LocalizedStrings.GetNonEncoded(-1556449487)); } } else { Utilities.EndResponse(context, HttpStatusCode.BadRequest); } return(false); }
// Token: 0x0600073A RID: 1850 internal abstract bool FilterRequest(object source, EventArgs e, RequestEventType eventType);
public static RequestEventType GetEventType(XDocument doc) { RequestEventType eventType = EventTypeHelper.GetEventType(doc.Root.Element("Event").Value); return(eventType); }
/// <summary> /// 根据XML转换成相应的实体 /// </summary> /// <param name="xml"></param> /// <returns></returns> public static RequestRootMsg ConvertEntity(string xml) { //将xml字符串解析成JObject对象 XmlDocument doc = new XmlDocument(); doc.LoadXml(xml); string json = JsonConvert.SerializeObject(doc); JObject jo = (JObject)JObject.Parse(json)["xml"]; RequestRootMsg rootMsg = ParseRequestRootMsg(jo); switch (rootMsg.MsgType) { case RequestMsgType.Text: rootMsg = rootMsg.ToTextMsg(jo); break; case RequestMsgType.Location: rootMsg = rootMsg.ToLocationMsg(jo); break; case RequestMsgType.Image: rootMsg = rootMsg.ToImageMsg(jo); break; case RequestMsgType.Voice: rootMsg = rootMsg.ToVideoMsg(jo); break; case RequestMsgType.Video: rootMsg = rootMsg.ToVideoMsg(jo); break; case RequestMsgType.Link: rootMsg = rootMsg.ToLinkMsg(jo); break; case RequestMsgType.ShortVideo: rootMsg = rootMsg.ToShortVideoMsg(jo); break; case RequestMsgType.Event: { RequestEventType eventType = GetRequestEventType(jo); switch (eventType) { case RequestEventType.Subscribe: rootMsg = rootMsg.ToSubscribeEventMsg(jo); break; case RequestEventType.UnSubscribe: rootMsg = rootMsg.ToUnSubscribeEventMsg(jo); break; default: throw new ArgumentNullException("消息/事件类型未匹配到!"); } } break; default: throw new ArgumentNullException("消息/事件类型未匹配到!"); } return(rootMsg); }
public RequestDomainEventBasic(RequestEventType eventType) : base(RequestMessageType.Event) { this.EventType = eventType; }