Пример #1
0
 private ClientAuthentificationInformation(string authenticate)
 {
     if (authenticate == null)
     {
         type  = ClientAuthentificationType.Unknown;
         realm = "None";
     }
     else if (authenticate.StartsWith(basicRealmProperty, StringComparison.OrdinalIgnoreCase))             // basic network authentification
     {
         type  = ClientAuthentificationType.Basic;
         realm = authenticate.Substring(basicRealmProperty.Length);
         if (!String.IsNullOrEmpty(realm) && realm[0] == '"')
         {
             realm = realm.Substring(1, realm.Length - 2);
         }
     }
     else if (authenticate.IndexOf("NTLM", StringComparison.OrdinalIgnoreCase) >= 0)             // Windows authentification
     {
         type  = ClientAuthentificationType.Ntlm;
         realm = integratedSecurity;
     }
     else
     {
         type  = ClientAuthentificationType.Unknown;
         realm = "Unknown";
     }
 }         // ctor
Пример #2
0
        }         // ctor

        private ClientAuthentificationInformation(ClientAuthentificationType type, string realm)
        {
            this.type  = type;
            this.realm = realm;
        }         // ctor