AuthenticationChallengeProxy.h [plain text]
#pragma once
#include "APIObject.h"
#include <WebCore/AuthenticationChallenge.h>
#include <wtf/WeakPtr.h>
namespace IPC {
class Connection;
}
namespace WebKit {
class AuthenticationDecisionListener;
class SecKeyProxyStore;
class WebCredential;
class WebProtectionSpace;
class AuthenticationChallengeProxy : public API::ObjectImpl<API::Object::Type::AuthenticationChallenge> {
public:
static Ref<AuthenticationChallengeProxy> create(WebCore::AuthenticationChallenge&& authenticationChallenge, uint64_t challengeID, Ref<IPC::Connection>&& connection, WeakPtr<SecKeyProxyStore>&& secKeyProxyStore)
{
return adoptRef(*new AuthenticationChallengeProxy(WTFMove(authenticationChallenge), challengeID, WTFMove(connection), WTFMove(secKeyProxyStore)));
}
WebCredential* proposedCredential() const;
WebProtectionSpace* protectionSpace() const;
AuthenticationDecisionListener& listener() const { return m_listener.get(); }
const WebCore::AuthenticationChallenge& core() { return m_coreAuthenticationChallenge; }
private:
AuthenticationChallengeProxy(WebCore::AuthenticationChallenge&&, uint64_t challengeID, Ref<IPC::Connection>&&, WeakPtr<SecKeyProxyStore>&&);
#if HAVE(SEC_KEY_PROXY)
static void sendClientCertificateCredentialOverXpc(IPC::Connection&, SecKeyProxyStore&, uint64_t challengeID, const WebCore::Credential&);
#endif
WebCore::AuthenticationChallenge m_coreAuthenticationChallenge;
mutable RefPtr<WebCredential> m_webCredential;
mutable RefPtr<WebProtectionSpace> m_webProtectionSpace;
Ref<AuthenticationDecisionListener> m_listener;
};
}