// Token: 0x06001276 RID: 4726 RVA: 0x0003B7F0 File Offset: 0x000399F0
        internal static string GetPswsMembershipId(UserToken userToken, NameValueCollection collection)
        {
            ExAssert.RetailAssert(userToken != null, "[PswsAuthorization.GetPswsMembershipId] userToken can't be null.");
            string friendlyName = userToken.Organization.GetFriendlyName();
            ExchangeRunspaceConfigurationSettings exchangeRunspaceConfigurationSettings = PswsAuthZHelper.BuildRunspaceConfigurationSettings("https://www.outlook.com/Psws/Service.svc", userToken, collection);
            CultureInfo cultureInfo;

            PswsAuthZHelper.TryParseCultureInfo(collection, out cultureInfo);
            string text = userToken.ManagedOrganization;

            if (string.IsNullOrWhiteSpace(text))
            {
                text = exchangeRunspaceConfigurationSettings.TenantOrganization;
            }
            string result = string.Format("Name:{0};AT:{1};UserOrg:{2};ManOrg:{3};SL:{4};FSL:{5};CA:{6};EDK:{7};Cul:{8};Proxy:{9}", new object[]
            {
                PswsAuthZHelper.GetUserNameForCache(userToken),
                userToken.AuthenticationType,
                friendlyName,
                text,
                exchangeRunspaceConfigurationSettings.CurrentSerializationLevel,
                exchangeRunspaceConfigurationSettings.ProxyFullSerialization,
                exchangeRunspaceConfigurationSettings.ClientApplication,
                exchangeRunspaceConfigurationSettings.EncodeDecodeKey,
                (cultureInfo == null) ? "null" : cultureInfo.Name,
                exchangeRunspaceConfigurationSettings.IsProxy
            });

            AuthZLogger.SafeSetLogger(PswsMetadata.IsProxy, exchangeRunspaceConfigurationSettings.IsProxy);
            AuthZLogger.SafeSetLogger(PswsMetadata.ClientApplication, exchangeRunspaceConfigurationSettings.ClientApplication);
            AuthZLogger.SafeSetLogger(PswsMetadata.ProxyFullSerialzation, exchangeRunspaceConfigurationSettings.ProxyFullSerialization);
            AuthZLogger.SafeSetLogger(PswsMetadata.SerializationLevel, exchangeRunspaceConfigurationSettings.CurrentSerializationLevel);
            AuthZLogger.SafeSetLogger(PswsMetadata.CultureInfo, (cultureInfo == null) ? "null" : cultureInfo.Name);
            AuthZLogger.SafeSetLogger(PswsMetadata.TenantOrganization, text);
            return(result);
        }
Ejemplo n.º 2
0
 // Token: 0x0600126D RID: 4717 RVA: 0x0003B44A File Offset: 0x0003964A
 protected override ExchangeRunspaceConfigurationSettings BuildRunspaceConfigurationSettings(string connectionString, IIdentity identity)
 {
     return(PswsAuthZHelper.BuildRunspaceConfigurationSettings(connectionString, HttpContext.Current.CurrentUserToken(), HttpContext.Current.Request.Headers));
 }