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