(file) Return to PAMBasicAuthenticatorUnix.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Security / Authentication

Diff for /pegasus/src/Pegasus/Security/Authentication/PAMBasicAuthenticatorUnix.cpp between version 1.36.2.1 and 1.38.24.1

version 1.36.2.1, 2007/03/23 21:53:54 version 1.38.24.1, 2008/10/15 07:00:34
Line 45 
Line 45 
     PEG_METHOD_ENTER(TRC_AUTHENTICATION,     PEG_METHOD_ENTER(TRC_AUTHENTICATION,
         "PAMBasicAuthenticator::PAMBasicAuthenticator()");         "PAMBasicAuthenticator::PAMBasicAuthenticator()");
  
     // Build up realm: <hostname>:<port>      // Build Authentication parameter realm required for Basic Challenge
       // e.g. realm="HostName"
  
     _realm.assign(System::getHostName());      _realm.assign("realm=");
       _realm.append(Char16('"'));
     // get the configured port number      _realm.append(System::getHostName());
     ConfigManager* configManager = ConfigManager::getInstance();      _realm.append(Char16('"'));
     String port = configManager->getCurrentValue("httpPort");  
   
     //  
     // Create realm that will be used for Basic challenges  
     //  
     _realm.append(":");  
     _realm.append(port);  
  
     PEG_METHOD_EXIT();     PEG_METHOD_EXIT();
 } }
Line 72 
Line 66 
  
 Boolean PAMBasicAuthenticator::authenticate( Boolean PAMBasicAuthenticator::authenticate(
     const String& userName,     const String& userName,
     const String& password,      const String& password)
     SessionKey& sessionKey)  
 { {
     PEG_METHOD_ENTER(TRC_AUTHENTICATION,     PEG_METHOD_ENTER(TRC_AUTHENTICATION,
         "PAMBasicAuthenticator::authenticate()");         "PAMBasicAuthenticator::authenticate()");
  
     if (Executor::authenticatePassword(     if (Executor::authenticatePassword(
         userName.getCString(), password.getCString(), sessionKey) != 0)          userName.getCString(), password.getCString()) != 0)
     {     {
         return false;         return false;
     }     }
Line 106 
Line 99 
     PEG_METHOD_ENTER(TRC_AUTHENTICATION,     PEG_METHOD_ENTER(TRC_AUTHENTICATION,
         "PAMBasicAuthenticator::getAuthResponseHeader()");         "PAMBasicAuthenticator::getAuthResponseHeader()");
  
     // Build response header: WWW-Authenticate: Basic "<hostname>:<port>"      // Build response header: WWW-Authenticate: Basic realm="HostName"
  
     String responseHeader = "WWW-Authenticate: Basic \"";      String responseHeader = "WWW-Authenticate: Basic ";
     responseHeader.append(_realm);     responseHeader.append(_realm);
     responseHeader.append("\"");  
  
     PEG_METHOD_EXIT();     PEG_METHOD_EXIT();
     return responseHeader;     return responseHeader;


Legend:
Removed from v.1.36.2.1  
changed lines
  Added in v.1.38.24.1

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2