// Token: 0x0600051F RID: 1311 RVA: 0x0001C974 File Offset: 0x0001AB74 protected override UriBuilder GetClientUrlForProxy() { string absoluteUri = base.ClientRequest.Url.AbsoluteUri; string uri = absoluteUri; if (this.isExplicitLogonRequest && !RequestPathParser.IsAutodiscoverV2Request(base.ClientRequest.Url.AbsoluteUri)) { uri = UrlHelper.RemoveExplicitLogonFromUrlAbsoluteUri(absoluteUri, this.explicitLogonAddress); } return(new UriBuilder(uri)); }
// Token: 0x0600051C RID: 1308 RVA: 0x0001C7CC File Offset: 0x0001A9CC protected override AnchorMailbox ResolveAnchorMailbox() { if (this.skipTargetBackEndCalculation) { base.Logger.Set(3, "OrgRelationship-Anonymous"); return(new AnonymousAnchorMailbox(this)); } if (base.UseRoutingHintForAnchorMailbox) { string text; if (RequestPathParser.IsAutodiscoverV2PreviewRequest(base.ClientRequest.Url.AbsolutePath)) { text = base.ClientRequest.Params["Email"]; } else if (RequestPathParser.IsAutodiscoverV2Version1Request(base.ClientRequest.Url.AbsolutePath)) { int num = base.ClientRequest.Url.AbsolutePath.LastIndexOf('/'); text = base.ClientRequest.Url.AbsolutePath.Substring(num + 1); } else { text = this.TryGetExplicitLogonNode(0); } string text2; if (ExplicitLogonParser.TryGetNormalizedExplicitLogonAddress(text, ref text2) && SmtpAddress.IsValidSmtpAddress(text2)) { this.isExplicitLogonRequest = true; this.explicitLogonAddress = text; if (HttpProxySettings.NoMailboxFallbackRoutingEnabled.Value) { base.IsAnchorMailboxFromRoutingHint = true; } bool failOnDomainNotFound = !RequestPathParser.IsAutodiscoverV2Request(base.ClientRequest.Url.AbsolutePath); if (this.preferAnchorMailboxHeader) { string text3 = base.ClientRequest.Headers[Constants.AnchorMailboxHeaderName]; if (!string.IsNullOrEmpty(text3) && !StringComparer.OrdinalIgnoreCase.Equals(text3, text2) && SmtpAddress.IsValidSmtpAddress(text3)) { return(AnchorMailboxFactory.ParseAnchorMailboxFromSmtp(this, text3, "AnchorMailboxHeader", failOnDomainNotFound)); } } return(AnchorMailboxFactory.ParseAnchorMailboxFromSmtp(this, text2, "ExplicitLogon", failOnDomainNotFound)); } } return(base.ResolveAnchorMailbox()); }
// Token: 0x060004A1 RID: 1185 RVA: 0x000198AC File Offset: 0x00017AAC protected override void DoProtocolSpecificBeginProcess() { if (!base.ClientRequest.IsAuthenticated) { try { if (this.IsSimpleSoapRequest()) { base.ParseClientRequest <bool>(new Func <Stream, bool>(this.ParseRequest), 81820); } } catch (FormatException innerException) { throw new HttpException(400, "FormatException parsing Autodiscover request", innerException); } catch (XmlException innerException2) { throw new HttpException(400, "XmlException parsing Autodiscover request", innerException2); } if (!base.IsWsSecurityRequest && !base.IsDomainBasedRequest && !RequestPathParser.IsOAuthMetadataRequest(base.ClientRequest.Url.AbsolutePath) && !RequestPathParser.IsAutodiscoverV2Request(base.ClientRequest.Url.AbsolutePath)) { throw new HttpProxyException(HttpStatusCode.Unauthorized, 4001, "Unauthenticated AutoDiscover request."); } } }
// Token: 0x060004A0 RID: 1184 RVA: 0x00019820 File Offset: 0x00017A20 protected override void OnInitializingHandler() { base.OnInitializingHandler(); if (!base.ClientRequest.IsAuthenticated) { base.IsWsSecurityRequest = base.ClientRequest.IsAnyWsSecurityRequest(); if (base.IsWsSecurityRequest && !AutodiscoverEwsWebConfiguration.WsSecurityEndpointEnabled) { throw new HttpException(404, "WS-Security endpoint is not supported"); } } if (base.ClientRequest.Url.ToString().EndsWith("autodiscover.xml", StringComparison.OrdinalIgnoreCase) || RequestPathParser.IsAutodiscoverV2Request(base.ClientRequest.Url.AbsolutePath)) { base.PreferAnchorMailboxHeader = true; } }