Commit fb886a1b authored by beidson's avatar beidson

WebCore:

        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: svn://svn.chromium.org/blink/trunk@18900 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 74225b66
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.
......
......@@ -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())
......
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment