예제 #1
0
        private void UpdateInternalAndExternalAuthenticationMethods()
        {
            List <AuthenticationMethod> list = new List <AuthenticationMethod>();

            if (base.InternalAuthenticationMethods != null)
            {
                list.AddRange(base.InternalAuthenticationMethods);
            }
            ADExchangeServiceVirtualDirectory.AddOrRemoveAuthenticationMethod(list, this.LiveIdNegotiateAuthentication, new AuthenticationMethod[]
            {
                AuthenticationMethod.LiveIdNegotiate
            });
            ADExchangeServiceVirtualDirectory.AddOrRemoveAuthenticationMethod(list, this.AdfsAuthentication, new AuthenticationMethod[]
            {
                AuthenticationMethod.Adfs
            });
            ADExchangeServiceVirtualDirectory.AddOrRemoveAuthenticationMethod(list, this.WSSecurityAuthentication, new AuthenticationMethod[]
            {
                AuthenticationMethod.WSSecurity
            });
            ADExchangeServiceVirtualDirectory.AddOrRemoveAuthenticationMethod(list, this.LiveIdBasicAuthentication, new AuthenticationMethod[]
            {
                AuthenticationMethod.LiveIdBasic
            });
            List <AuthenticationMethod> authenticationMethods = list;
            bool?authenticationMethodFlag = this.BasicAuthentication;

            AuthenticationMethod[] applicableAuthenticationMethods = new AuthenticationMethod[1];
            ADExchangeServiceVirtualDirectory.AddOrRemoveAuthenticationMethod(authenticationMethods, authenticationMethodFlag, applicableAuthenticationMethods);
            ADExchangeServiceVirtualDirectory.AddOrRemoveAuthenticationMethod(list, this.DigestAuthentication, new AuthenticationMethod[]
            {
                AuthenticationMethod.Digest
            });
            ADExchangeServiceVirtualDirectory.AddOrRemoveAuthenticationMethod(list, this.WindowsAuthentication, new AuthenticationMethod[]
            {
                AuthenticationMethod.Ntlm,
                AuthenticationMethod.WindowsIntegrated
            });
            ADExchangeServiceVirtualDirectory.AddOrRemoveAuthenticationMethod(list, this.OAuthAuthentication, new AuthenticationMethod[]
            {
                AuthenticationMethod.OAuth
            });
            MultiValuedProperty <AuthenticationMethod> multiValuedProperty = new MultiValuedProperty <AuthenticationMethod>(list);

            base.InternalAuthenticationMethods = multiValuedProperty;
            base.ExternalAuthenticationMethods = multiValuedProperty;
        }
예제 #2
0
        internal static void LiveIdAuthenticationSetter(object value, IPropertyBag propertyBag)
        {
            List <AuthenticationMethod> list = new List <AuthenticationMethod>();
            MultiValuedProperty <AuthenticationMethod> multiValuedProperty = (MultiValuedProperty <AuthenticationMethod>)propertyBag[ADVirtualDirectorySchema.InternalAuthenticationMethods];

            if (multiValuedProperty != null)
            {
                list.AddRange(multiValuedProperty);
            }
            ADExchangeServiceVirtualDirectory.AddOrRemoveAuthenticationMethod(list, new bool?((bool)value), new AuthenticationMethod[]
            {
                AuthenticationMethod.LiveIdFba
            });
            MultiValuedProperty <AuthenticationMethod> value2 = new MultiValuedProperty <AuthenticationMethod>(list);

            propertyBag[ADVirtualDirectorySchema.InternalAuthenticationMethods] = value2;
            propertyBag[ADVirtualDirectorySchema.ExternalAuthenticationMethods] = value2;
        }