565 pUsernameUtf8 = SenXmlUtils::ToUtf8LC((*response)().Username()); |
565 pUsernameUtf8 = SenXmlUtils::ToUtf8LC((*response)().Username()); |
566 pPasswordUtf8 = SenXmlUtils::ToUtf8LC((*response)().Password()); |
566 pPasswordUtf8 = SenXmlUtils::ToUtf8LC((*response)().Password()); |
567 TLSLOG_FORMAT((KSenCoreServiceManagerLogChannelBase , KMinLogLevel, _L8("Username: %S"), pUsernameUtf8)); |
567 TLSLOG_FORMAT((KSenCoreServiceManagerLogChannelBase , KMinLogLevel, _L8("Username: %S"), pUsernameUtf8)); |
568 TLSLOG_FORMAT((KSenCoreServiceManagerLogChannelBase , KMinLogLevel, _L8("Password: %S"), pPasswordUtf8 )); |
568 TLSLOG_FORMAT((KSenCoreServiceManagerLogChannelBase , KMinLogLevel, _L8("Password: %S"), pPasswordUtf8 )); |
569 HBufC8* pEncodedUsername = NULL; |
569 HBufC8* pEncodedUsername = NULL; |
570 illegalUsername = SenXmlUtils::EncodeHttpCharactersL(*pUsernameUtf8, |
570 illegalUsername = |
|
571 SenXmlUtils::EncodeHttpCharactersL(*pUsernameUtf8, |
571 pEncodedUsername); |
572 pEncodedUsername); |
572 if (illegalUsername) |
573 if (illegalUsername) |
573 { |
574 { |
574 TLSLOG(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,(_L("Username included illegal characters."))); |
575 TLSLOG(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,(_L("Username included illegal characters."))); |
575 delete pEncodedUsername; |
576 delete pEncodedUsername; |
614 // because if both were available, then user was |
615 // because if both were available, then user was |
615 // prompted to allow modification of AuthzID AND |
616 // prompted to allow modification of AuthzID AND |
616 // if advisory was changed in service (is no longer |
617 // if advisory was changed in service (is no longer |
617 // valid), there would NOT be any way for end-user |
618 // valid), there would NOT be any way for end-user |
618 // to change (remove) it(!) |
619 // to change (remove) it(!) |
619 TLSLOG_L(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,"There was at least AuthzID available"); |
620 |
620 CSenElement& element = aProvider.AsElement(); |
621 CSenElement& element = aProvider.AsElement(); |
621 delete element.RemoveElement(KSenIdpAdvisoryAuthnIdLocalname); |
622 delete element.RemoveElement(KSenIdpAdvisoryAuthnIdLocalname); |
622 |
623 |
623 aProvider.SetUserInfoL(*pUsernameUtf8, |
624 aProvider.SetUserInfoL(*pUsernameUtf8, |
624 KNullDesC8, |
625 KNullDesC8, |
651 |
652 |
652 aResponse().iUsername.Zero(); |
653 aResponse().iUsername.Zero(); |
653 aResponse().iPassword.Zero(); |
654 aResponse().iPassword.Zero(); |
654 if (!illegalUsername) |
655 if (!illegalUsername) |
655 { |
656 { |
656 TLSLOG(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,(_L("NOT illegalUsername"))); |
657 aResponse().iUsername.Copy(pUsernameUtf8->Des()); |
657 if(pUsernameUtf8) |
658 aResponse().iPassword.Copy(pPasswordUtf8->Des()); |
658 { |
659 } |
659 TLSLOG_FORMAT((KSenCoreServiceManagerLogChannelBase , KMinLogLevel, _L8(" pUsernameUtf8 Length is %d"), pUsernameUtf8->Length())); |
660 |
660 if(pUsernameUtf8->Length() > 0 && pUsernameUtf8->Length() <= KSenAuthMaxUsernameLength) |
|
661 { |
|
662 TLSLOG(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,(_L("Copy username"))); |
|
663 aResponse().iUsername.Copy(pUsernameUtf8->Des()); |
|
664 } |
|
665 } |
|
666 if(pPasswordUtf8) |
|
667 { |
|
668 TLSLOG_FORMAT((KSenCoreServiceManagerLogChannelBase , KMinLogLevel, _L8(" pPasswordUtf8 Length is %d"), pPasswordUtf8->Length())); |
|
669 if(pPasswordUtf8->Length() > 0 && pPasswordUtf8->Length() <= KSenAuthMaxPasswordLength) |
|
670 { |
|
671 TLSLOG(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,(_L("Copy password"))); |
|
672 aResponse().iPassword.Copy(pPasswordUtf8->Des()); |
|
673 } |
|
674 } |
|
675 } |
|
676 CleanupStack::PopAndDestroy(2); // pPasswordUtf8, pUsernameUtf8 |
661 CleanupStack::PopAndDestroy(2); // pPasswordUtf8, pUsernameUtf8 |
677 } |
662 } |
678 else |
663 else |
679 { |
664 { |
680 aResponse().iUsername.Zero(); |
|
681 aResponse().iPassword.Zero(); |
|
682 TLSLOG(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,(_L("User pressed Cancel Button in Password dialog"))); |
665 TLSLOG(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,(_L("User pressed Cancel Button in Password dialog"))); |
683 } |
666 } |
684 } |
667 } |
685 else if(reqStatus.Int() == KErrNotFound) |
668 else if(reqStatus.Int() == KErrNotFound) |
686 { |
669 { |
687 TLSLOG(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,(_L("Password dialog plugin notifier impl. was not found"))); |
670 TLSLOG(KSenCoreServiceManagerLogChannelBase , KMinLogLevel,(_L("Password dialog plugin notifier impl. was not found"))); |
688 } |
671 } |
689 else |
672 else |
690 { |
673 { |
691 TLSLOG_FORMAT((KSenCoreServiceManagerLogChannelBase , KMinLogLevel, _L8(" Notifier plugin for 'Password' dialog returned an error: %d"), reqStatus.Int())); |
674 TLSLOG_FORMAT((KSenCoreServiceManagerLogChannelBase , KMinLogLevel, _L8(" Notifier plugin for 'Password' dialog returned an error: %d"), |
|
675 reqStatus.Int())); |
692 } |
676 } |
693 |
677 |
694 CleanupStack::PopAndDestroy(2); // request, response; |
678 CleanupStack::PopAndDestroy(2); // request, response; |
695 CleanupStack::Pop(); // notifier |
679 CleanupStack::Pop(); // notifier |
696 |
680 |