|
reSIProcate/DialogUsageManager
9694
|

Public Member Functions | |
| AuthState () | |
| bool | handleChallenge (UserProfile &userProfile, const SipMessage &challenge) |
| void | addAuthentication (SipMessage &origRequest) |
| void | authSucceeded () |
Private Types | |
| typedef std::map< Data, RealmState > | RealmStates |
Private Attributes | |
| RealmStates | mRealms |
| bool | mFailed |
Definition at line 86 of file ClientAuthManager.hxx.
typedef std::map<Data, RealmState> resip::ClientAuthManager::AuthState::RealmStates [private] |
Definition at line 95 of file ClientAuthManager.hxx.
| ClientAuthManager::AuthState::AuthState | ( | ) |
Definition at line 182 of file ClientAuthManager.cxx.
: mFailed(false) { }
| void ClientAuthManager::AuthState::addAuthentication | ( | SipMessage & | origRequest | ) |
Definition at line 251 of file ClientAuthManager.cxx.
References resip::SipMessage::remove().
{
request.remove(h_ProxyAuthorizations);
request.remove(h_Authorizations);
if (mFailed) return;
for(RealmStates::iterator i = mRealms.begin(); i!=mRealms.end(); i++)
{
i->second.addAuthentication(request);
}
}

| void ClientAuthManager::AuthState::authSucceeded | ( | ) |
Definition at line 242 of file ClientAuthManager.cxx.
| bool ClientAuthManager::AuthState::handleChallenge | ( | UserProfile & | userProfile, |
| const SipMessage & | challenge | ||
| ) |
Definition at line 189 of file ClientAuthManager.cxx.
References resip::SipMessage::exists(), resip::SipMessage::header(), and InfoLog.
Referenced by resip::ClientAuthManager::handle().
{
if (mFailed)
{
return false;
}
bool handled = true;
if (challenge.exists(h_WWWAuthenticates))
{
for (Auths::const_iterator i = challenge.header(h_WWWAuthenticates).begin();
i != challenge.header(h_WWWAuthenticates).end(); ++i)
{
if (i->exists(p_realm))
{
if (!mRealms[i->param(p_realm)].handleAuth(userProfile, *i, false))
{
handled = false;
break;
}
}
else
{
return false;
}
}
}
if (challenge.exists(h_ProxyAuthenticates))
{
for (Auths::const_iterator i = challenge.header(h_ProxyAuthenticates).begin();
i != challenge.header(h_ProxyAuthenticates).end(); ++i)
{
if (i->exists(p_realm))
{
if (!mRealms[i->param(p_realm)].handleAuth(userProfile, *i, true))
{
handled = false;
break;
}
}
else
{
return false;
}
}
if(!handled)
{
InfoLog( << "ClientAuthManager::AuthState::handleChallenge failed for: " << challenge);
}
}
return handled;
}

bool resip::ClientAuthManager::AuthState::mFailed [private] |
Definition at line 97 of file ClientAuthManager.hxx.
Definition at line 96 of file ClientAuthManager.hxx.
1.7.5.1