AuthenticationChallenge.h [plain text]
#pragma once
#include "AuthenticationChallengeBase.h"
#include "AuthenticationClient.h"
namespace WebCore {
class CurlResponse;
class WEBCORE_EXPORT AuthenticationChallenge final : public AuthenticationChallengeBase {
public:
AuthenticationChallenge()
{
}
AuthenticationChallenge(const ProtectionSpace& protectionSpace, const Credential& proposedCredential, unsigned previousFailureCount, const ResourceResponse& response, const ResourceError& error)
: AuthenticationChallengeBase(protectionSpace, proposedCredential, previousFailureCount, response, error)
{
}
AuthenticationChallenge(const CurlResponse&, unsigned, const ResourceResponse&, AuthenticationClient* = nullptr);
AuthenticationChallenge(const URL&, const CertificateInfo&, const ResourceError&, AuthenticationClient* = nullptr);
AuthenticationClient* authenticationClient() const { return m_authenticationClient.get(); }
private:
ProtectionSpaceServerType protectionSpaceServerTypeFromURI(const URL&, bool isForProxy);
ProtectionSpace protectionSpaceForPasswordBased(const CurlResponse&, const ResourceResponse&);
ProtectionSpace protectionSpaceForServerTrust(const URL&, const CertificateInfo&);
Optional<uint16_t> determineProxyPort(const URL&);
ProtectionSpaceAuthenticationScheme authenticationSchemeFromCurlAuth(long);
String parseRealm(const ResourceResponse&);
void removeLeadingAndTrailingQuotes(String&);
RefPtr<AuthenticationClient> m_authenticationClient;
};
}