webservices/wshttpchanneltransportplugin/src/senhttpchannelimpl.cpp
branchRCL_3
changeset 35 6f5ef5fc65b4
parent 20 32ab7ae9ec94
child 36 c5fabff9b552
equal deleted inserted replaced
34:f68f07157250 35:6f5ef5fc65b4
  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"); 
  1277             // create and register new IDP
  1278             // create and register new IDP
  1278             iSessionAuthentication = CSenIdentityProvider::NewL(aURI.UriDes(),
  1279             iSessionAuthentication = CSenIdentityProvider::NewL(aURI.UriDes(),
  1279                                                                 KNullDesC8);
  1280                                                                 KNullDesC8);
  1280             iSessionAuthentication->SetFrameworkIdL(KNullDesC8); 
  1281             iSessionAuthentication->SetFrameworkIdL(KNullDesC8); 
  1281             TInt retVal = iManager.RegisterIdentityProviderL(iSessionAuthentication);
  1282             TInt retVal = iManager.RegisterIdentityProviderL(iSessionAuthentication);
  1285                     retVal));
  1286                     retVal));
  1286                 iSessionAuthentication = NULL;
  1287                 iSessionAuthentication = NULL;
  1287                 TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"GetCredentialsL() returning EFalse");
  1288                 TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"GetCredentialsL() returning EFalse");
  1288                 return EFalse; // decision: we could not save info into database, abort
  1289                 return EFalse; // decision: we could not save info into database, abort
  1289                 }
  1290                 }
  1290             TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"New IDP registeration OK. Proceeding.");
  1291             TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"--- New IDP registeration OK. Proceeding.");
  1291             }
  1292             }
  1292         // we have credentials
  1293         // we have credentials
       
  1294        TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"--- we have credentials");         
  1293         TRAPD(err, aUsername = 
  1295         TRAPD(err, aUsername = 
  1294             aRealm.Pool().OpenStringL(iSessionAuthentication->AuthzID()));
  1296             aRealm.Pool().OpenStringL(iSessionAuthentication->AuthzID()));
  1295         TRAP(err, aPassword = 
  1297         TRAP(err, aPassword = 
  1296             aRealm.Pool().OpenStringL(iSessionAuthentication->Password()));
  1298             aRealm.Pool().OpenStringL(iSessionAuthentication->Password()));
       
  1299 		TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("--- username (%s), password (%d)"), aUsername, aPassword));
  1297         TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"GetCredentialsL() returning ETrue");
  1300         TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"GetCredentialsL() returning ETrue");
  1298         return ETrue;
  1301         return ETrue;
  1299         }
  1302         }
  1300     else
  1303     else
  1301         {
  1304         {
  1305         delete element.RemoveElement(KSenIdpPasswordLocalname);
  1308         delete element.RemoveElement(KSenIdpPasswordLocalname);
  1306         
  1309         
  1307         TPckgBuf<TSenAuthentication> authInfo;
  1310         TPckgBuf<TSenAuthentication> authInfo;
  1308         iManager.AuthenticationForL(*iSessionAuthentication, authInfo);
  1311         iManager.AuthenticationForL(*iSessionAuthentication, authInfo);
  1309         iPasswordFromUser = ETrue;
  1312         iPasswordFromUser = ETrue;
  1310 
  1313         TLSLOG_L(KSenHttpChannelLogChannelBase , KMinLogLevel,"--- AuthenticationForL Called");
  1311         TRAPD(err, aUsername = 
  1314         TRAPD(err, aUsername = 
  1312                 aRealm.Pool().OpenStringL(authInfo().iUsername));
  1315                 aRealm.Pool().OpenStringL(authInfo().iUsername));
  1313         TRAP(err, aPassword = 
  1316         TRAP(err, aPassword = 
  1314                 aRealm.Pool().OpenStringL(authInfo().iPassword));
  1317                 aRealm.Pool().OpenStringL(authInfo().iPassword));
  1315         iBasicConnectionTries++;
  1318         iBasicConnectionTries++;