本文整理汇总了C++中MMRAuthChallenge类的典型用法代码示例。如果您正苦于以下问题:C++ MMRAuthChallenge类的具体用法?C++ MMRAuthChallenge怎么用?C++ MMRAuthChallenge使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了MMRAuthChallenge类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: generateProtectionSpaceFromMMRAuthChallenge
static ProtectionSpace generateProtectionSpaceFromMMRAuthChallenge(const MMRAuthChallenge& authChallenge)
{
KURL url(ParsedURLString, WTF::String(authChallenge.url().c_str()));
ASSERT(url.isValid());
return ProtectionSpace(url.host(), url.port(),
static_cast<ProtectionSpaceServerType>(authChallenge.serverType()),
authChallenge.realm().c_str(),
static_cast<ProtectionSpaceAuthenticationScheme>(authChallenge.authScheme()));
}
示例2: url
void MediaPlayerPrivate::onAuthenticationAccepted(const MMRAuthChallenge& authChallenge) const
{
KURL url(ParsedURLString, WTF::String(authChallenge.url().c_str()));
if (!url.isValid())
return;
ProtectionSpace protectionSpace = generateProtectionSpaceFromMMRAuthChallenge(authChallenge);
Credential savedCredential = CredentialStorage::get(protectionSpace);
if (savedCredential.isEmpty())
CredentialStorage::set(Credential(authChallenge.username().c_str(), authChallenge.password().c_str(), static_cast<CredentialPersistence>(authChallenge.persistence())), protectionSpace, url);
}
示例3: url
bool MediaPlayerPrivate::onAuthenticationNeeded(MMRAuthChallenge& authChallenge)
{
KURL url(ParsedURLString, String(authChallenge.url().c_str()));
if (!url.isValid())
return false;
ProtectionSpace protectionSpace = generateProtectionSpaceFromMMRAuthChallenge(authChallenge);
Credential credential = CredentialStorage::get(protectionSpace);
bool isConfirmed = false;
if (credential.isEmpty()) {
if (frameView() && frameView()->hostWindow())
isConfirmed = frameView()->hostWindow()->platformPageClient()->authenticationChallenge(url, protectionSpace, credential);
} else
isConfirmed = true;
if (isConfirmed)
authChallenge.setCredential(credential.user().utf8().data(), credential.password().utf8().data(), static_cast<MMRAuthChallenge::CredentialPersistence>(credential.persistence()));
return isConfirmed;
}
示例4: url
void MediaPlayerPrivate::onAuthenticationNeeded(MMRAuthChallenge& authChallenge)
{
KURL url(ParsedURLString, WTF::String(authChallenge.url().c_str()));
if (!url.isValid())
return;
ProtectionSpace protectionSpace = generateProtectionSpaceFromMMRAuthChallenge(authChallenge);
Credential credential = CredentialStorage::get(protectionSpace);
if (!credential.isEmpty()) {
notifyChallengeResult(url, protectionSpace, AuthenticationChallengeSuccess, credential);
return;
}
m_isAuthenticationChallenging = true;
AuthenticationChallengeManager::instance()->authenticationChallenge(url, protectionSpace, credential,
this, m_webCorePlayer->mediaPlayerClient()->mediaPlayerHostWindow()->platformPageClient());
}