WebCore:
authorbeidson <beidson@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 17 Jan 2007 08:13:36 +0000 (08:13 +0000)
committerbeidson <beidson@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 17 Jan 2007 08:13:36 +0000 (08:13 +0000)
        Reviewed by Oliver

        A few enhancements to the HTTP Auth architecture

        * platform/network/ProtectionSpace.cpp:
        (WebCore::ProtectionSpace::isProxy):
        (WebCore::ProtectionSpace::receivesCredentialSecurely):
        * platform/network/ProtectionSpace.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@18900 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/platform/network/ProtectionSpace.cpp
WebCore/platform/network/ProtectionSpace.h

index 87ef2b5a379b76b7129a04525c18be18cf1cbe87..10c07377cff5331605dfd07abaa8b07801ca47b1 100644 (file)
@@ -1,3 +1,14 @@
+2007-01-16  Brady Eidson  <beidson@apple.com>
+
+        Reviewed by Oliver
+
+        A few enhancements to the HTTP Auth architecture
+
+        * platform/network/ProtectionSpace.cpp:
+        (WebCore::ProtectionSpace::isProxy):
+        (WebCore::ProtectionSpace::receivesCredentialSecurely):
+        * platform/network/ProtectionSpace.h:
+
 2007-01-16  Alice Liu  <alice.liu@apple.com>
 
         Reviewed by harrison.
index e98386ab9eb22ff6e0590a67d35b2253f8c6af74..dff3c25c4c2efaa109bd654943f279d4ed51762c 100644 (file)
@@ -61,6 +61,14 @@ ProtectionSpaceServerType ProtectionSpace::serverType() const
     return m_serverType; 
 }
 
+bool ProtectionSpace::isProxy() const
+{
+    return (m_serverType == ProtectionSpaceProxyHTTP ||
+            m_serverType == ProtectionSpaceProxyHTTPS ||
+            m_serverType == ProtectionSpaceProxyFTP ||
+            m_serverType == ProtectionSpaceProxySOCKS);
+}
+
 const String& ProtectionSpace::realm() const 
 { 
     return m_realm; 
@@ -71,6 +79,14 @@ ProtectionSpaceAuthenticationScheme ProtectionSpace::authenticationScheme() cons
     return m_authenticationScheme; 
 }
 
+bool ProtectionSpace::receivesCredentialSecurely() const
+{
+    return (m_serverType == ProtectionSpaceServerHTTPS ||
+            m_serverType == ProtectionSpaceServerFTPS ||
+            m_serverType == ProtectionSpaceProxyHTTPS ||
+            m_authenticationScheme == ProtectionSpaceAuthenticationSchemeHTTPDigest);
+}
+
 bool operator==(const ProtectionSpace& a, const ProtectionSpace& b)
 {
     if (a.host() != b.host())
index 05b8439155f9854d433973fe578e013dceedaaad..53c26823a091184cc20c4c7d0adc1dacb063eee9 100644 (file)
@@ -56,9 +56,12 @@ public:
     const String& host() const;
     int port() const;
     ProtectionSpaceServerType serverType() const;
+    bool isProxy() const;
     const String& realm() const;
     ProtectionSpaceAuthenticationScheme authenticationScheme() const;
     
+    bool receivesCredentialSecurely() const;
+
 private:
     String m_host;
     int m_port;