webservices/wshttpchanneltransportplugin/src/senhttpchannelimpl.cpp
branchRCL_3
changeset 22 c5fabff9b552
parent 21 6f5ef5fc65b4
child 23 1adb97a15c2f
equal deleted inserted replaced
21:6f5ef5fc65b4 22:c5fabff9b552
   198     CHttpFilterProxyInterface::InstallFilterL( iSess );
   198     CHttpFilterProxyInterface::InstallFilterL( iSess );
   199     TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpChannelImpl::ConstructL() - HTTPProxyFilter installed for EKA2 build.")));
   199     TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpChannelImpl::ConstructL() - HTTPProxyFilter installed for EKA2 build.")));
   200     iSess.StringPool().OpenL(HttpFilterCommonStringsExt::GetLanguageTable());
   200     iSess.StringPool().OpenL(HttpFilterCommonStringsExt::GetLanguageTable());
   201     iSess.StringPool().OpenL(HttpFilterCommonStringsExt::GetTable());
   201     iSess.StringPool().OpenL(HttpFilterCommonStringsExt::GetTable());
   202 	TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpChannelImpl::ConstructL() - Installing  HTTPAcceptProxyFilter for EKA2 build.")));
   202 	TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpChannelImpl::ConstructL() - Installing  HTTPAcceptProxyFilter for EKA2 build.")));
   203     CHttpFilterAcceptHeaderInterface::InstallFilterL(iSess);
   203     //CHttpFilterAcceptHeaderInterface::InstallFilterL(iSess); //There is issue with installing this filter. so disabling it temporarly
   204     TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpChannelImpl::ConstructL() - HTTPAcceptProxyFilter installed for EKA2 build.")));
   204     TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpChannelImpl::ConstructL() - HTTPAcceptProxyFilter installed for EKA2 build.")));
   205   //#else
   205   //#else
   206   //  LOG_WRITE_L("HTTPProxyFilter is NOT in use with EKA2 debug builds.");
   206   //  LOG_WRITE_L("HTTPProxyFilter is NOT in use with EKA2 debug builds.");
   207   //#endif
   207   //#endif
   208 #else // __INSTALL_HTTP_PROXY_FILTER__ is not defined by macro in .mmp
   208 #else // __INSTALL_HTTP_PROXY_FILTER__ is not defined by macro in .mmp
  1272         {
  1272         {
  1273         TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"GetCredentialsL() reading auth-pair from database (senidentites.xml)");
  1273         TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"GetCredentialsL() reading auth-pair from database (senidentites.xml)");
  1274         iSessionAuthentication = iManager.IdentityProviderL(aURI.UriDes());
  1274         iSessionAuthentication = iManager.IdentityProviderL(aURI.UriDes());
  1275         if(!iSessionAuthentication)
  1275         if(!iSessionAuthentication)
  1276             {
  1276             {
  1277             TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"--- create and register new IDP"); 
       
  1278             // create and register new IDP
  1277             // create and register new IDP
  1279             iSessionAuthentication = CSenIdentityProvider::NewL(aURI.UriDes(),
  1278             iSessionAuthentication = CSenIdentityProvider::NewL(aURI.UriDes(),
  1280                                                                 KNullDesC8);
  1279                                                                 KNullDesC8);
  1281             iSessionAuthentication->SetFrameworkIdL(KNullDesC8); 
  1280             iSessionAuthentication->SetFrameworkIdL(KNullDesC8); 
  1282             TInt retVal = iManager.RegisterIdentityProviderL(iSessionAuthentication);
  1281             TInt retVal = iManager.RegisterIdentityProviderL(iSessionAuthentication);
  1286                     retVal));
  1285                     retVal));
  1287                 iSessionAuthentication = NULL;
  1286                 iSessionAuthentication = NULL;
  1288                 TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"GetCredentialsL() returning EFalse");
  1287                 TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"GetCredentialsL() returning EFalse");
  1289                 return EFalse; // decision: we could not save info into database, abort
  1288                 return EFalse; // decision: we could not save info into database, abort
  1290                 }
  1289                 }
  1291             TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"--- New IDP registeration OK. Proceeding.");
  1290             TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"New IDP registeration OK. Proceeding.");
  1292             }
  1291             }
  1293         // we have credentials
  1292         // we have credentials
  1294        TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"--- we have credentials");         
       
  1295         TRAPD(err, aUsername = 
  1293         TRAPD(err, aUsername = 
  1296             aRealm.Pool().OpenStringL(iSessionAuthentication->AuthzID()));
  1294             aRealm.Pool().OpenStringL(iSessionAuthentication->AuthzID()));
  1297         TRAP(err, aPassword = 
  1295         TRAP(err, aPassword = 
  1298             aRealm.Pool().OpenStringL(iSessionAuthentication->Password()));
  1296             aRealm.Pool().OpenStringL(iSessionAuthentication->Password()));
  1299 		TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("--- username (%s), password (%d)"), aUsername, aPassword));
       
  1300         TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"GetCredentialsL() returning ETrue");
  1297         TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"GetCredentialsL() returning ETrue");
  1301         return ETrue;
  1298         return ETrue;
  1302         }
  1299         }
  1303     else
  1300     else
  1304         {
  1301         {
  1308         delete element.RemoveElement(KSenIdpPasswordLocalname);
  1305         delete element.RemoveElement(KSenIdpPasswordLocalname);
  1309         
  1306         
  1310         TPckgBuf<TSenAuthentication> authInfo;
  1307         TPckgBuf<TSenAuthentication> authInfo;
  1311         iManager.AuthenticationForL(*iSessionAuthentication, authInfo);
  1308         iManager.AuthenticationForL(*iSessionAuthentication, authInfo);
  1312         iPasswordFromUser = ETrue;
  1309         iPasswordFromUser = ETrue;
  1313         TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"--- AuthenticationForL Called");
  1310 
  1314         TRAPD(err, aUsername = 
  1311         TRAPD(err, aUsername = 
  1315                 aRealm.Pool().OpenStringL(authInfo().iUsername));
  1312                 aRealm.Pool().OpenStringL(authInfo().iUsername));
  1316         TRAP(err, aPassword = 
  1313         TRAP(err, aPassword = 
  1317                 aRealm.Pool().OpenStringL(authInfo().iPassword));
  1314                 aRealm.Pool().OpenStringL(authInfo().iPassword));
  1318         iBasicConnectionTries++;
  1315         iBasicConnectionTries++;