+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.
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;
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())
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;