private void Complete1(AsyncTask task) { this.requestTimer.Stop(); if (!base.Aborted) { base.QueryList.LogLatency("EPWRADC1", this.requestTimer.ElapsedMilliseconds); } if (this.autoDiscoverExternalAuthenticationRequest.Exception != null) { base.SetExceptionInResultList(this.autoDiscoverExternalAuthenticationRequest.Exception); base.Complete(); return; } if (this.webProxyExternalAuthenticationRequest.Exception != null) { base.SetExceptionInResultList(this.webProxyExternalAuthenticationRequest.Exception); base.Complete(); return; } ProxyAuthenticator proxyAuthenticator = ProxyAuthenticator.Create(this.autoDiscoverExternalAuthenticationRequest.RequestedToken, this.sharingKey, base.ClientContext.MessageId); this.queryItems = new AutoDiscoverQueryItem[base.QueryList.Count]; string target = this.autoDiscoverUrl.ToString(); for (int i = 0; i < base.QueryList.Count; i++) { base.QueryList[i].Target = target; this.queryItems[i] = new AutoDiscoverQueryItem(base.QueryList[i].RecipientData, base.Application.Name, base.QueryList[i]); } this.autoDiscoverQuery = new AutoDiscoverQueryExternal(base.Application, base.ClientContext, base.RequestLogger, this.autoDiscoverUrl, proxyAuthenticator, this.queryItems, this.createAutoDiscoverRequest, base.QueryList); this.autoDiscoverQuery.BeginInvoke(new TaskCompleteCallback(this.Complete2)); }
private void Complete2(AsyncTask task) { ProxyAuthenticator proxyAuthenticator = ProxyAuthenticator.Create(this.webProxyExternalAuthenticationRequest.RequestedToken, this.sharingKey, base.ClientContext.MessageId); this.dispatcher = new DispatcherWithAutoDiscoverResults(base.Application, base.QueryList, this.queryItems, proxyAuthenticator, RequestType.FederatedCrossForest, new DispatcherWithAutoDiscoverResults.CreateRequestWithQueryListDelegate(this.CreateRequest)); this.dispatcher.BeginInvoke(new TaskCompleteCallback(this.Complete3)); }
private void Complete1(AsyncTask task) { ProxyAuthenticator proxyAuthenticator = ProxyAuthenticator.Create(OAuthCredentialsFactory.Create(base.ClientContext as InternalClientContext, base.RequestLogger), base.ClientContext.MessageId, false); this.dispatcher = new DispatcherWithAutoDiscoverResults(base.Application, base.QueryList, this.queryItems, proxyAuthenticator, RequestType.FederatedCrossForest, new DispatcherWithAutoDiscoverResults.CreateRequestWithQueryListDelegate(this.CreateRequest)); this.dispatcher.BeginInvoke(new TaskCompleteCallback(this.Complete2)); }
public override void BeginInvoke(TaskCompleteCallback callback) { base.BeginInvoke(callback); ProxyAuthenticator proxyAuthenticator = ProxyAuthenticator.Create(OAuthCredentialsFactory.Create(base.ClientContext as InternalClientContext, base.RequestLogger), base.ClientContext.MessageId, false); this.proxyWebRequest = new ProxyWebRequest(base.Application, base.ClientContext, RequestType.FederatedCrossForest, base.RequestLogger, base.QueryList, TargetServerVersion.Unknown, proxyAuthenticator, this.webServiceUri, this.webServiceUri.Source); this.proxyWebRequest.BeginInvoke(new TaskCompleteCallback(this.CompleteWebRequest)); }
public override void BeginInvoke(TaskCompleteCallback callback) { base.BeginInvoke(callback); ProxyAuthenticator proxyAuthenticator = ProxyAuthenticator.Create(OAuthCredentialsFactory.CreateAsApp(base.ClientContext as InternalClientContext, base.RequestLogger), base.ClientContext.MessageId, true); this.queryItems = AutoDiscoverQueryItem.CreateAutoDiscoverQueryItems(base.Application, base.QueryList, this.autoDiscoverUrl); this.autoDiscoverQuery = new AutoDiscoverQueryExternalByOAuth(base.Application, base.ClientContext, base.RequestLogger, this.autoDiscoverUrl, proxyAuthenticator, this.queryItems, this.createAutoDiscoverRequest, base.QueryList); this.autoDiscoverQuery.BeginInvoke(new TaskCompleteCallback(this.Complete1)); }
private void CompleteAuthenticator(AsyncTask task) { if (this.externalAuthenticationRequest.Exception != null) { base.SetExceptionInResultList(this.externalAuthenticationRequest.Exception); base.Complete(); return; } ProxyAuthenticator proxyAuthenticator = ProxyAuthenticator.Create(this.externalAuthenticationRequest.RequestedToken, this.sharingKey, base.ClientContext.MessageId); this.proxyWebRequest = new ProxyWebRequest(base.Application, base.ClientContext, RequestType.FederatedCrossForest, base.RequestLogger, base.QueryList, TargetServerVersion.Unknown, proxyAuthenticator, this.webServiceUri, this.webServiceUri.Source); this.proxyWebRequest.BeginInvoke(new TaskCompleteCallback(this.CompleteWebRequest)); }
internal ProxyAuthenticator GetProxyAuthenticatorForAutoDiscover(Uri uri, SerializedSecurityContext serializedSecurityContext, string messageId) { if (this.AccessMethod == AvailabilityAccessMethod.OrgWideFBBasic && this.Credentials != null) { return(ProxyAuthenticator.Create(new CredentialCache { { uri, "Basic", this.Credentials } }, serializedSecurityContext, messageId)); } return(ProxyAuthenticator.Create(this.Credentials, serializedSecurityContext, messageId)); }
public override ProxyAuthenticator CreateInternalProxyAuthenticator() { return(ProxyAuthenticator.Create(base.WSSecurityHeader, null, base.MessageId)); }