private static void EnsureInitialized() { if (Util.IsMicrosoftHostedOnly && NavBarClientBase.endPointConfiguration == null) { NavBarClientBase.endPointConfiguration = ConfigurationManager.AppSettings["ShellServiceEndPointConfiguration"]; NavBarClientBase.showPerfConsole = StringComparer.OrdinalIgnoreCase.Equals("true", WebConfigurationManager.AppSettings["ShowPerformanceConsole"]); NavBarClientBase.certificateSubject = ConfigurationManager.AppSettings["MsOnlineShellService_CertSubject"]; NavBarClientBase.certificateThumbprint = ConfigurationManager.AppSettings["MsOnlineShellService_CertThumbprint"]; string text = string.Format("{0}{1}/scripts/o365shared.js", EcpUrl.EcpVDirForStaticResource, Util.ApplicationVersion); string theme = ((PagesSection)ConfigurationManager.GetSection("system.web/pages")).Theme; string text2 = string.Format("{0}{1}/themes/{2}/o365shared.css", EcpUrl.EcpVDirForStaticResource, Util.ApplicationVersion, theme); string text3 = string.Format("{0}{1}/themes/{2}/o365shared-rtl.css", EcpUrl.EcpVDirForStaticResource, Util.ApplicationVersion, theme); string text4 = string.Format("{0}{1}/themes/{2}/o365shared.png", EcpUrl.EcpVDirForStaticResource, Util.ApplicationVersion, theme); string text5 = string.Format("{0}{1}/scripts/CoreShellBundle.js", EcpUrl.EcpVDirForStaticResource, Util.ApplicationVersion); string text6 = string.Format("{0}{1}/themes/{2}/O365ShellCore.css", EcpUrl.EcpVDirForStaticResource, Util.ApplicationVersion, theme); string text7 = string.Format("{0}{1}/themes/{2}/O365ShellCore-rtl.css", EcpUrl.EcpVDirForStaticResource, Util.ApplicationVersion, theme); string text8 = string.Format("{0}{1}/scripts/O365ShellPlusTestExtension.js", EcpUrl.EcpVDirForStaticResource, Util.ApplicationVersion); string text9 = string.Format("{0}{1}/themes/{2}/O365ShellPlus.css", EcpUrl.EcpVDirForStaticResource, Util.ApplicationVersion, theme); string text10 = string.Format("{0}{1}/themes/{2}/O365ShellPlus-rtl.css", EcpUrl.EcpVDirForStaticResource, Util.ApplicationVersion, theme); string text11 = ConfigurationManager.AppSettings["O365Url"]; MockNavBar.Initialize(text11, text, text2, text3, text4, text5, text6, text7, text8, text9, text10); if (NavBarClientBase.endPointConfiguration != null && !string.IsNullOrEmpty(NavBarClientBase.certificateThumbprint)) { NavBarClientBase.certificate = TlsCertificateInfo.FindCertByThumbprint(NavBarClientBase.certificateThumbprint); NavBarClientBase.loadConfigSuccess = (NavBarClientBase.certificate != null); } ExTraceGlobals.WebServiceTracer.TraceInformation(0, 0L, "NavBarHelper load config success: {0}. EndPointConfiguration: '{1}'; ShellJs: '{2}'; Certicate: '{3}' {4}.", new object[] { NavBarClientBase.loadConfigSuccess, NavBarClientBase.endPointConfiguration, text, NavBarClientBase.certificateSubject, (NavBarClientBase.certificate != null) ? "found" : "not found" }); if (!NavBarClientBase.loadConfigSuccess) { EcpEventLogConstants.Tuple_Office365NavBarLoadConfigFailed.LogEvent(new object[] { NavBarClientBase.loadConfigSuccess, NavBarClientBase.endPointConfiguration, text, NavBarClientBase.certificateSubject }); } } }
// Token: 0x06000369 RID: 873 RVA: 0x0000D608 File Offset: 0x0000B808 private void InvokeBposShellService(AuthZClientInfo effectiveCaller) { string text = string.Empty; try { using (ShellServiceClient shellServiceClient = new ShellServiceClient("MsOnlineShellService_EndPointConfiguration")) { string certificateThumbprint = ConfigurationManager.AppSettings["MsOnlineShellService_CertThumbprint"]; shellServiceClient.ClientCredentials.ClientCertificate.Certificate = TlsCertificateInfo.FindCertByThumbprint(certificateThumbprint); EndpointAddress address = shellServiceClient.Endpoint.Address; Uri uri = new Uri(address.Uri.AbsoluteUri); shellServiceClient.Endpoint.Address = new EndpointAddress(uri, address.Identity, new AddressHeader[0]); string text2 = HttpContext.Current.Request.Headers["RPSOrgIdPUID"]; this.userPuid = (string.IsNullOrEmpty(text2) ? HttpContext.Current.Request.Headers["RPSPUID"] : text2); this.boxServiceUrl = shellServiceClient.Endpoint.Address.Uri.AbsoluteUri; text = Guid.NewGuid().ToString(); OwaApplication.GetRequestDetailsLogger.ActivityScope.SetProperty(BposAssetReader <T> .LogMetadata.ShellRequestInfo, string.Format("OP:{0},UP:{1},UPN:{2},G:{3}", new object[] { text2, this.userPuid, this.userPrincipalName, text })); this.data = this.ExecuteRequest(shellServiceClient, this.culture.Name, this.userPrincipalName, this.userPuid, effectiveCaller, text); this.LogWorkloadLinks(this.data); } } catch (Exception e) { this.data = default(T); this.LogExceptionFromBposShellService(e, text); } }
// Token: 0x06001A94 RID: 6804 RVA: 0x000634DC File Offset: 0x000616DC protected override Alert[] InternalExecute() { string text = HttpContext.Current.Request.Headers["RPSOrgIdPUID"]; string userPuid = string.IsNullOrEmpty(text) ? HttpContext.Current.Request.Headers["RPSPUID"] : text; string principalName = ((LiveIDIdentity)Thread.CurrentPrincipal.Identity).PrincipalName; string shellServiceUrl = string.Empty; string trackingGuid = Guid.NewGuid().ToString(); Alert[] alerts; try { using (ShellServiceClient shellServiceClient = new ShellServiceClient("MsOnlineShellService_EndPointConfiguration")) { string certificateThumbprint = ConfigurationManager.AppSettings["MsOnlineShellService_CertThumbprint"]; shellServiceClient.ClientCredentials.ClientCertificate.Certificate = TlsCertificateInfo.FindCertByThumbprint(certificateThumbprint); shellServiceUrl = shellServiceClient.Endpoint.Address.Uri.AbsoluteUri; GetAlertRequest getAlertRequest = new GetAlertRequest { WorkloadId = WorkloadAuthenticationId.Exchange, UserPuid = userPuid, UserPrincipalName = principalName, TrackingGuid = trackingGuid, CultureName = Thread.CurrentThread.CurrentUICulture.Name }; alerts = shellServiceClient.GetAlerts(getAlertRequest); } } catch (Exception) { this.LogExceptionFromO365ShellService(principalName, userPuid, shellServiceUrl, trackingGuid); throw; } return(alerts); }
// Token: 0x06001BCF RID: 7119 RVA: 0x0006B438 File Offset: 0x00069638 private bool UpdateO365Theme(string themeId, string userPrincipalName, UserContext userContext) { bool flag = userContext.FeaturesManager.ClientServerSettings.O365Header.Enabled || userContext.FeaturesManager.ClientServerSettings.O365G2Header.Enabled; this.tracer.TraceDebug <bool, bool>(0L, "UpdateO365Theme::isFeatureSupported='{0}', this.skipO365Call='{1}'", flag, this.request.SkipO365Call); if (!flag || this.request.SkipO365Call) { return(false); } string text = null; string text2 = null; string text3 = string.Empty; bool result; try { using (ShellServiceClient shellServiceClient = new ShellServiceClient("MsOnlineShellService_EndPointConfiguration")) { string text4 = ConfigurationManager.AppSettings["MsOnlineShellService_CertThumbprint"]; this.tracer.TraceDebug <string, CommunicationState>(1L, "UpdateO365Theme::certificateThumbprint='{0}',client.State'={1}'", text4, shellServiceClient.State); shellServiceClient.ClientCredentials.ClientCertificate.Certificate = TlsCertificateInfo.FindCertByThumbprint(text4); EndpointAddress address = shellServiceClient.Endpoint.Address; Uri uri = new Uri(address.Uri.AbsoluteUri); shellServiceClient.Endpoint.Address = new EndpointAddress(uri, address.Identity, new AddressHeader[0]); string text5 = HttpContext.Current.Request.Headers["RPSOrgIdPUID"]; text = (string.IsNullOrEmpty(text5) ? HttpContext.Current.Request.Headers["RPSPUID"] : text5); text2 = shellServiceClient.Endpoint.Address.Uri.AbsoluteUri; text3 = Guid.NewGuid().ToString(); this.tracer.TraceDebug(2L, "UpdateO365Theme::orgIdPuid='{0}', userPuid='{1}', userPrincipalName='{2}',serviceUrl='{3}'", new object[] { text5, text, userPrincipalName, text2 }); SetUserThemeRequest setUserThemeRequest = new SetUserThemeRequest { ThemeId = themeId, TrackingGuid = text3, UserPrincipalName = userPrincipalName, UserPuid = text, WorkloadId = WorkloadAuthenticationId.Exchange }; this.tracer.TraceDebug(3L, "UpdateO365Theme::setUserThemeRequest.ThemeId='{0}', .TrackingGuid='{1}', .UserPrincipalName='{2}', .UserPuid='{3}', .WorkloadId='{4}'", new object[] { setUserThemeRequest.ThemeId, setUserThemeRequest.TrackingGuid, setUserThemeRequest.UserPrincipalName, setUserThemeRequest.UserPuid, setUserThemeRequest.WorkloadId }); shellServiceClient.SetUserTheme(setUserThemeRequest); this.tracer.TraceDebug <CommunicationState>(4L, "UpdateO365Theme::setUserThemeRequest.State='{0}'", shellServiceClient.State); result = true; } } catch (Exception ex) { this.tracer.TraceError(5L, "UpdateO365Theme::Exception: themeId='{0}', trackingGuid='{1}', userPrincipalName='{2}', userPuid='{3}', serviceUrl='{4}', exception='{5}'", new object[] { themeId, text3, userPrincipalName, text, text2, ex }); OwaDiagnostics.LogEvent(ClientsEventLogConstants.Tuple_O365SetUserThemeError, userPrincipalName + text2 + themeId, new object[] { text, userPrincipalName, text3, text2, themeId, ex }); result = false; } return(result); }
private void GetSuiteServiceInfo() { if (this.suiteServiceProxyInfo == null) { string text = HttpContext.Current.Request.Headers["RPSOrgIdPUID"]; string userPuid = string.IsNullOrEmpty(text) ? HttpContext.Current.Request.Headers["RPSPUID"] : text; string principalName = ((LiveIDIdentity)Thread.CurrentPrincipal.Identity).PrincipalName; string shellServiceUrl = string.Empty; string trackingGuid = string.Empty; try { using (ShellServiceClient shellServiceClient = new ShellServiceClient("MsOnlineShellService_EndPointConfiguration")) { string certificateThumbprint = ConfigurationManager.AppSettings["MsOnlineShellService_CertThumbprint"]; shellServiceClient.ClientCredentials.ClientCertificate.Certificate = TlsCertificateInfo.FindCertByThumbprint(certificateThumbprint); shellServiceUrl = shellServiceClient.Endpoint.Address.Uri.AbsoluteUri; trackingGuid = Guid.NewGuid().ToString(); GetSuiteServiceInfoRequest getSuiteServiceInfoRequest = new GetSuiteServiceInfoRequest { WorkloadId = WorkloadAuthenticationId.Exchange, CultureName = CultureInfo.CurrentUICulture.Name, UserPuid = userPuid, UserPrincipalName = principalName, TrackingGuid = trackingGuid, UrlOfRequestingPage = HttpContext.Current.Request.QueryString["returnUrl"] }; this.suiteServiceProxyInfo = shellServiceClient.GetSuiteServiceInfo(getSuiteServiceInfoRequest); } } catch (Exception exception) { this.suiteServiceProxyInfo = null; this.LogExceptionFromO365ShellService(exception, principalName, userPuid, shellServiceUrl); } } }