static void authenticateCallback(SoupSession* session, SoupMessage* soupMessage, SoupAuth* soupAuth, gboolean retrying) { RefPtr<ResourceHandle> handle = static_cast<ResourceHandle*>(g_object_get_data(G_OBJECT(soupMessage), "handle")); if (!handle) return; handle->didReceiveAuthenticationChallenge(AuthenticationChallenge(session, soupMessage, soupAuth, retrying, handle.get())); }
bool ArgumentCoder<AuthenticationChallenge>::decode(ArgumentDecoder& decoder, AuthenticationChallenge& challenge) { ProtectionSpace protectionSpace; if (!decoder.decode(protectionSpace)) return false; Credential proposedCredential; if (!decoder.decode(proposedCredential)) return false; unsigned previousFailureCount; if (!decoder.decode(previousFailureCount)) return false; ResourceResponse failureResponse; if (!decoder.decode(failureResponse)) return false; ResourceError error; if (!decoder.decode(error)) return false; challenge = AuthenticationChallenge(protectionSpace, proposedCredential, previousFailureCount, failureResponse, error); return true; }
void didReceiveChallenge(CFURLConnectionRef conn, CFURLAuthChallengeRef challenge, const void* clientInfo) { ResourceHandle* handle = (ResourceHandle*)clientInfo; ASSERT(handle); LOG(Network, "CFNet - didReceiveChallenge(conn=%p, handle=%p (%s)", conn, handle, handle->request().url().string().utf8().data()); handle->didReceiveAuthenticationChallenge(AuthenticationChallenge(challenge, handle)); }
static void didReceiveChallenge(CFURLConnectionRef conn, CFURLAuthChallengeRef challenge, const void* clientInfo) { #if LOG_DISABLED UNUSED_PARAM(conn); #endif ResourceHandle* handle = static_cast<ResourceHandle*>(const_cast<void*>(clientInfo)); ASSERT(handle); LOG(Network, "CFNet - didReceiveChallenge(conn=%p, handle=%p (%s)", conn, handle, handle->firstRequest().url().string().utf8().data()); handle->didReceiveAuthenticationChallenge(AuthenticationChallenge(challenge, handle)); }
void ResourceHandle::didReceiveAuthenticationChallenge(const AuthenticationChallenge& challenge) { LOG(Network, "CFNet - didReceiveAuthenticationChallenge()"); ASSERT(!d->m_currentCFChallenge); ASSERT(d->m_currentWebChallenge.isNull()); // Since CFURLConnection networking relies on keeping a reference to the original CFURLAuthChallengeRef, // we make sure that is actually present ASSERT(challenge.cfURLAuthChallengeRef()); d->m_currentCFChallenge = challenge.cfURLAuthChallengeRef(); d->m_currentWebChallenge = AuthenticationChallenge(d->m_currentCFChallenge, this); if (client()) client()->didReceiveAuthenticationChallenge(this, d->m_currentWebChallenge); }
void SynchronousResourceHandleCFURLConnectionDelegate::didReceiveChallenge(CFURLAuthChallengeRef challenge) { LOG(Network, "CFNet - SynchronousResourceHandleCFURLConnectionDelegate::didReceiveChallenge(handle=%p (%s)", m_handle, m_handle->firstRequest().url().string().utf8().data()); m_handle->didReceiveAuthenticationChallenge(AuthenticationChallenge(challenge, m_handle)); }
void didReceiveAuthenticationChallengeCallback(CFURLDownloadRef, CFURLAuthChallengeRef challenge, const void* clientInfo) { Download* download = downloadFromClientInfo(clientInfo); download->didReceiveAuthenticationChallenge(AuthenticationChallenge(challenge, download->authenticationClient())); }