INTEGRATION: CWS kso13 (1.44.14); FILE MERGED
2004/12/16 16:30:24 kso 1.44.14.1: #i39147# - AuthenticationRequest: Only call setXXX methods if setting is allowed (now we do a canSetXXX before).
This commit is contained in:
@@ -2,9 +2,9 @@
|
|||||||
*
|
*
|
||||||
* $RCSfile: iahndl.cxx,v $
|
* $RCSfile: iahndl.cxx,v $
|
||||||
*
|
*
|
||||||
* $Revision: 1.44 $
|
* $Revision: 1.45 $
|
||||||
*
|
*
|
||||||
* last change: $Author: kz $ $Date: 2004-10-04 18:07:35 $
|
* last change: $Author: obo $ $Date: 2005-01-27 12:19:25 $
|
||||||
*
|
*
|
||||||
* The Contents of this file are made available subject to the terms of
|
* The Contents of this file are made available subject to the terms of
|
||||||
* either of the following licenses
|
* either of the following licenses
|
||||||
@@ -1614,18 +1614,25 @@ UUIInteractionHandler::handleAuthenticationRequest(
|
|||||||
aRec(xContainer->find(rRequest.ServerName, this));
|
aRec(xContainer->find(rRequest.ServerName, this));
|
||||||
if (aRec.UserList.getLength() != 0)
|
if (aRec.UserList.getLength() != 0)
|
||||||
{
|
{
|
||||||
|
if (xSupplyAuthentication->canSetUserName())
|
||||||
xSupplyAuthentication->
|
xSupplyAuthentication->
|
||||||
setUserName(aRec.UserList[0].UserName.getStr());
|
setUserName(aRec.UserList[0].UserName.getStr());
|
||||||
|
if (xSupplyAuthentication->canSetPassword())
|
||||||
|
{
|
||||||
OSL_ENSURE(aRec.UserList[0].Passwords.getLength() != 0,
|
OSL_ENSURE(aRec.UserList[0].Passwords.getLength() != 0,
|
||||||
"empty password list");
|
"empty password list");
|
||||||
xSupplyAuthentication->
|
xSupplyAuthentication->
|
||||||
setPassword(aRec.UserList[0].Passwords[0].getStr());
|
setPassword(aRec.UserList[0].Passwords[0].getStr());
|
||||||
|
}
|
||||||
if (aRec.UserList[0].Passwords.getLength() > 1)
|
if (aRec.UserList[0].Passwords.getLength() > 1)
|
||||||
if (rRequest.HasRealm)
|
if (rRequest.HasRealm)
|
||||||
|
{
|
||||||
|
if (xSupplyAuthentication->canSetRealm())
|
||||||
xSupplyAuthentication->
|
xSupplyAuthentication->
|
||||||
setRealm(aRec.UserList[0].Passwords[1].
|
setRealm(aRec.UserList[0].Passwords[1].
|
||||||
getStr());
|
getStr());
|
||||||
else
|
}
|
||||||
|
else if (xSupplyAuthentication->canSetAccount())
|
||||||
xSupplyAuthentication->
|
xSupplyAuthentication->
|
||||||
setAccount(aRec.UserList[0].Passwords[1].
|
setAccount(aRec.UserList[0].Passwords[1].
|
||||||
getStr());
|
getStr());
|
||||||
@@ -1646,17 +1653,22 @@ UUIInteractionHandler::handleAuthenticationRequest(
|
|||||||
if (!rRequest.HasPassword
|
if (!rRequest.HasPassword
|
||||||
|| rRequest.Password != aRec.UserList[0].Passwords[0])
|
|| rRequest.Password != aRec.UserList[0].Passwords[0])
|
||||||
{
|
{
|
||||||
|
if (xSupplyAuthentication->canSetUserName())
|
||||||
xSupplyAuthentication->
|
xSupplyAuthentication->
|
||||||
setUserName(aRec.UserList[0].UserName.getStr());
|
setUserName(aRec.UserList[0].UserName.getStr());
|
||||||
|
if (xSupplyAuthentication->canSetPassword())
|
||||||
xSupplyAuthentication->
|
xSupplyAuthentication->
|
||||||
setPassword(aRec.UserList[0].Passwords[0].
|
setPassword(aRec.UserList[0].Passwords[0].
|
||||||
getStr());
|
getStr());
|
||||||
if (aRec.UserList[0].Passwords.getLength() > 1)
|
if (aRec.UserList[0].Passwords.getLength() > 1)
|
||||||
if (rRequest.HasRealm)
|
if (rRequest.HasRealm)
|
||||||
|
{
|
||||||
|
if (xSupplyAuthentication->canSetRealm())
|
||||||
xSupplyAuthentication->
|
xSupplyAuthentication->
|
||||||
setRealm(aRec.UserList[0].Passwords[1].
|
setRealm(aRec.UserList[0].Passwords[1].
|
||||||
getStr());
|
getStr());
|
||||||
else
|
}
|
||||||
|
else if (xSupplyAuthentication->canSetAccount())
|
||||||
xSupplyAuthentication->
|
xSupplyAuthentication->
|
||||||
setAccount(aRec.UserList[0].Passwords[1].
|
setAccount(aRec.UserList[0].Passwords[1].
|
||||||
getStr());
|
getStr());
|
||||||
@@ -1694,7 +1706,9 @@ UUIInteractionHandler::handleAuthenticationRequest(
|
|||||||
case ERRCODE_BUTTON_OK:
|
case ERRCODE_BUTTON_OK:
|
||||||
if (xSupplyAuthentication.is())
|
if (xSupplyAuthentication.is())
|
||||||
{
|
{
|
||||||
|
if (xSupplyAuthentication->canSetUserName())
|
||||||
xSupplyAuthentication->setUserName(aInfo.GetUserName());
|
xSupplyAuthentication->setUserName(aInfo.GetUserName());
|
||||||
|
if (xSupplyAuthentication->canSetPassword())
|
||||||
xSupplyAuthentication->setPassword(aInfo.GetPassword());
|
xSupplyAuthentication->setPassword(aInfo.GetPassword());
|
||||||
xSupplyAuthentication->
|
xSupplyAuthentication->
|
||||||
setRememberPassword(
|
setRememberPassword(
|
||||||
@@ -1704,9 +1718,13 @@ UUIInteractionHandler::handleAuthenticationRequest(
|
|||||||
star::ucb::RememberAuthentication_SESSION :
|
star::ucb::RememberAuthentication_SESSION :
|
||||||
star::ucb::RememberAuthentication_NO);
|
star::ucb::RememberAuthentication_NO);
|
||||||
if (rRequest.HasRealm)
|
if (rRequest.HasRealm)
|
||||||
|
{
|
||||||
|
if (xSupplyAuthentication->canSetRealm())
|
||||||
xSupplyAuthentication->setRealm(aInfo.GetAccount());
|
xSupplyAuthentication->setRealm(aInfo.GetAccount());
|
||||||
else
|
}
|
||||||
|
else if (xSupplyAuthentication->canSetAccount())
|
||||||
xSupplyAuthentication->setAccount(aInfo.GetAccount());
|
xSupplyAuthentication->setAccount(aInfo.GetAccount());
|
||||||
|
|
||||||
xSupplyAuthentication->select();
|
xSupplyAuthentication->select();
|
||||||
}
|
}
|
||||||
// Empty user name can not be valid:
|
// Empty user name can not be valid:
|
||||||
@@ -1773,6 +1791,7 @@ UUIInteractionHandler::handleMasterPasswordRequest(
|
|||||||
case ERRCODE_BUTTON_OK:
|
case ERRCODE_BUTTON_OK:
|
||||||
if (xSupplyAuthentication.is())
|
if (xSupplyAuthentication.is())
|
||||||
{
|
{
|
||||||
|
if (xSupplyAuthentication->canSetPassword())
|
||||||
xSupplyAuthentication->setPassword(aInfo.GetPassword());
|
xSupplyAuthentication->setPassword(aInfo.GetPassword());
|
||||||
xSupplyAuthentication->select();
|
xSupplyAuthentication->select();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user