~ubuntu-branches/ubuntu/utopic/resiprocate/utopic-updates

« back to all changes in this revision

Viewing changes to repro/monkeys/DigestAuthenticator.cxx

  • Committer: Package Import Robot
  • Author(s): Daniel Pocock
  • Date: 2014-01-12 11:46:45 UTC
  • mfrom: (1.1.15)
  • Revision ID: package-import@ubuntu.com-20140112114645-4g9v7vzp3psxiso9
Tags: 1.9.0~beta10-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
using namespace std;
29
29
 
30
30
DigestAuthenticator::DigestAuthenticator(ProxyConfig& config,
31
 
                                         Dispatcher* authRequestDispatcher) :
 
31
                                         Dispatcher* authRequestDispatcher,
 
32
                                         const Data& staticRealm) :
32
33
   Processor("DigestAuthenticator"),
33
34
   mAuthRequestDispatcher(authRequestDispatcher),
 
35
   mStaticRealm(staticRealm),
34
36
   mNoIdentityHeaders(config.getConfigBool("DisableIdentity", false)),
35
37
   mHttpHostname(config.getConfigData("HttpHostname", "")),
36
38
   mHttpPort(config.getConfigInt("HttpPort", 5080)),
318
320
   {
319
321
      if ((fromUri.user() == user) || (fromUri.user() == "anonymous"))
320
322
         return true;
 
323
   }
321
324
 
322
 
      // Now try the form where the username parameter in the auth
323
 
      // header is the full fromUri, e.g.
324
 
      //    Proxy-Authorization: Digest username="user@domain" ...
325
 
      //
326
 
      if (fromUri.getAorNoPort() == user)
 
325
   // Now try the form where the username parameter in the auth
 
326
   // header is the full fromUri, e.g.
 
327
   //    Proxy-Authorization: Digest username="user@domain" ...
 
328
   //
 
329
   if (fromUri.getAorNoPort() == user)
 
330
   {
327
331
         return true;
328
332
   }
329
333
 
418
422
resip::Data
419
423
DigestAuthenticator::getRealm(RequestContext &rc)
420
424
{
 
425
   if(!mStaticRealm.empty())
 
426
   {
 
427
      return mStaticRealm;
 
428
   }
421
429
   return rc.getDigestRealm();
422
430
}
423
431