|
reSIProcate/DialogUsageManager
9694
|


Public Member Functions | |
| ClientAuthDecorator (bool isProxyCredential, const Auth &auth, const UserProfile::DigestCredential &credential, const Data &authQop, const Data &nonceCountString) | |
| virtual | ~ClientAuthDecorator () |
| virtual void | decorateMessage (SipMessage &msg, const Tuple &source, const Tuple &destination, const Data &sigcompId) |
| virtual void | rollbackMessage (SipMessage &msg) |
| virtual MessageDecorator * | clone () const |
Private Attributes | |
| bool | mIsProxyCredential |
| Auth | mAuth |
| UserProfile::DigestCredential | mCredential |
| Data | mAuthQop |
| Data | mNonceCountString |
Definition at line 16 of file ClientAuthManager.cxx.
| ClientAuthDecorator::ClientAuthDecorator | ( | bool | isProxyCredential, |
| const Auth & | auth, | ||
| const UserProfile::DigestCredential & | credential, | ||
| const Data & | authQop, | ||
| const Data & | nonceCountString | ||
| ) | [inline] |
Definition at line 19 of file ClientAuthManager.cxx.
:
mIsProxyCredential(isProxyCredential), mAuth(auth), mCredential(credential), mAuthQop(authQop), mNonceCountString(nonceCountString) {}
| virtual ClientAuthDecorator::~ClientAuthDecorator | ( | ) | [inline, virtual] |
Definition at line 21 of file ClientAuthManager.cxx.
{}
| virtual MessageDecorator* ClientAuthDecorator::clone | ( | ) | const [inline, virtual] |
Implements resip::MessageDecorator.
Definition at line 94 of file ClientAuthManager.cxx.
{ return new ClientAuthDecorator(mIsProxyCredential, mAuth, mCredential, mAuthQop, mNonceCountString); }
| virtual void ClientAuthDecorator::decorateMessage | ( | SipMessage & | msg, |
| const Tuple & | source, | ||
| const Tuple & | destination, | ||
| const Data & | sigcompId | ||
| ) | [inline, virtual] |
Implements resip::MessageDecorator.
Definition at line 22 of file ClientAuthManager.cxx.
References resip::ParserContainer< T >::back(), DebugLog, resip::Random::getCryptoRandomHex(), resip::SipMessage::header(), resip::ClientAuthExtension::instance(), resip::Helper::makeChallengeResponseAuth(), resip::ClientAuthExtension::makeChallengeResponseAuth(), resip::Helper::makeChallengeResponseAuthWithA1(), resip::ClientAuthExtension::makeChallengeResponseAuthWithA1(), and resip::ParserContainer< T >::push_back().
{
Data cnonce = Random::getCryptoRandomHex(16);
Auths & target = mIsProxyCredential ? msg.header(h_ProxyAuthorizations) : msg.header(h_Authorizations);
DebugLog( << " Add auth, " << this << " in response to: " << mAuth);
Auth auth;
if (ClientAuthExtension::instance().algorithmAndQopSupported(mAuth))
{
DebugLog(<<"Using extension to make auth response");
if(mCredential.isPasswordA1Hash)
{
ClientAuthExtension::instance().makeChallengeResponseAuthWithA1(msg,
mCredential.user,
mCredential.password,
mAuth,
cnonce,
mAuthQop,
mNonceCountString,
auth);
}
else
{
ClientAuthExtension::instance().makeChallengeResponseAuth(msg,
mCredential.user,
mCredential.password,
mAuth,
cnonce,
mAuthQop,
mNonceCountString,
auth);
}
}
else
{
if(mCredential.isPasswordA1Hash)
{
Helper::makeChallengeResponseAuthWithA1(msg,
mCredential.user,
mCredential.password,
mAuth,
cnonce,
mAuthQop,
mNonceCountString,
auth);
}
else
{
Helper::makeChallengeResponseAuth(msg,
mCredential.user,
mCredential.password,
mAuth,
cnonce,
mAuthQop,
mNonceCountString,
auth);
}
}
target.push_back(auth);
DebugLog(<<"ClientAuthDecorator, proxy: " << mIsProxyCredential << " " << target.back());
}

| virtual void ClientAuthDecorator::rollbackMessage | ( | SipMessage & | msg | ) | [inline, virtual] |
Implements resip::MessageDecorator.
Definition at line 89 of file ClientAuthManager.cxx.
References resip::SipMessage::header(), and resip::ParserContainerBase::pop_back().
{
Auths & target = mIsProxyCredential ? msg.header(h_ProxyAuthorizations) : msg.header(h_Authorizations);
target.pop_back();
}

Auth ClientAuthDecorator::mAuth [private] |
Definition at line 97 of file ClientAuthManager.cxx.
Data ClientAuthDecorator::mAuthQop [private] |
Definition at line 99 of file ClientAuthManager.cxx.
Definition at line 98 of file ClientAuthManager.cxx.
bool ClientAuthDecorator::mIsProxyCredential [private] |
Definition at line 96 of file ClientAuthManager.cxx.
Data ClientAuthDecorator::mNonceCountString [private] |
Definition at line 100 of file ClientAuthManager.cxx.
1.7.5.1