コード例 #1
0
        // Token: 0x060003B6 RID: 950 RVA: 0x00017190 File Offset: 0x00015390
        private void ExecuteGetUserSettingsCommand(IPrincipal callingPrincipal, CallContext callContext)
        {
            IOrganizationScopedIdentity organizationScopedIdentity = callingPrincipal.Identity as IOrganizationScopedIdentity;

            if (organizationScopedIdentity != null)
            {
                this.ExecuteCommandForPartnerUser(organizationScopedIdentity, callContext);
                return;
            }
            WindowsIdentity windowsIdentity = callingPrincipal.Identity as WindowsIdentity;
            ClientSecurityContextIdentity clientSecurityContextIdentity = callingPrincipal.Identity as ClientSecurityContextIdentity;

            if (windowsIdentity != null || clientSecurityContextIdentity != null)
            {
                this.ExecuteCommand(callingPrincipal.Identity, callContext);
                return;
            }
            ExternalIdentity externalIdentity = callingPrincipal.Identity as ExternalIdentity;

            if (externalIdentity != null)
            {
                this.ExecuteCommandForExternalUser(externalIdentity, callContext);
                return;
            }
            callContext.Response.ErrorCode    = ErrorCode.InvalidRequest;
            callContext.Response.ErrorMessage = Strings.InvalidRequest;
        }
コード例 #2
0
        private static OwaClientSecurityContextIdentity InternalCreateFromClientSecurityContextIdentity(ClientSecurityContextIdentity cscIdentity, string logonName, OrganizationId userOrganizationId = null)
        {
            SidBasedIdentity sidBasedIdentity = cscIdentity as SidBasedIdentity;

            if (sidBasedIdentity != null)
            {
                OwaClientSecurityContextIdentity.PrePopulateUserGroupSids(sidBasedIdentity);
            }
            OwaClientSecurityContextIdentity result;

            try
            {
                using (ClientSecurityContext clientSecurityContext = cscIdentity.CreateClientSecurityContext())
                {
                    result = new OwaClientSecurityContextIdentity(clientSecurityContext, logonName, cscIdentity.AuthenticationType, userOrganizationId);
                }
            }
            catch (AuthzException ex)
            {
                ExTraceGlobals.CoreTracer.TraceDebug <string, string, AuthzException>(0L, "OwaClientSecurityContextIdentity.CreateFromClientSecurityContextIdentity for ClientSecurityContextIdentity.Name={0} ClientSecurityContextIdentity.AuthenticationType={1} failed with exception: {2}", cscIdentity.Name, cscIdentity.AuthenticationType, ex);
                if (ex.InnerException is Win32Exception)
                {
                    throw new OwaIdentityException("There was a problem creating the Client Security Context.", ex);
                }
                throw;
            }
            return(result);
        }
        // Token: 0x06000D59 RID: 3417 RVA: 0x00059534 File Offset: 0x00057734
        internal static OwaClientSecurityContextIdentity CreateFromClientSecurityContextIdentity(ClientSecurityContextIdentity cscIdentity)
        {
            ClientSecurityContext clientSecurityContext = cscIdentity.CreateClientSecurityContext();

            return(new OwaClientSecurityContextIdentity(clientSecurityContext, cscIdentity.Name, cscIdentity.AuthenticationType));
        }
コード例 #4
0
 internal static OwaClientSecurityContextIdentity CreateFromClientSecurityContextIdentity(ClientSecurityContextIdentity cscIdentity)
 {
     if (cscIdentity == null)
     {
         throw new ArgumentNullException("cscIdentity");
     }
     return(OwaClientSecurityContextIdentity.InternalCreateFromClientSecurityContextIdentity(cscIdentity, cscIdentity.Name, null));
 }