Lines Matching defs:asyncResp

182  * @param[in] asyncResp Async Response
247 * @param[in] asyncResp Async Response
253 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
263 messages::strictAccountTypes(asyncResp->res, "AccountTypes");
268 if (!getUserGroupFromAccountType(asyncResp->res, accountTypes,
275 setDbusProperty(asyncResp, "AccountTypes",
282 const sd_bus_error* e, const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
287 messages::internalError(asyncResp->res);
295 messages::resourceAlreadyExists(asyncResp->res, "ManagerAccount",
301 messages::resourceNotFound(asyncResp->res, "ManagerAccount", username);
311 messages::propertyValueFormatError(asyncResp->res, newUser, "UserName");
316 messages::createLimitReachedForResource(asyncResp->res);
321 messages::internalError(asyncResp->res);
382 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
399 asyncResp,
400 [asyncResp, roleMapObjData, serverType,
405 messages::internalError(asyncResp->res);
408 asyncResp->res
419 asyncResp->res, "null",
436 *obj, asyncResp->res, //
452 asyncResp,
466 asyncResp->res, *localRole,
472 asyncResp,
489 messages::propertyMissing(asyncResp->res,
495 messages::propertyMissing(asyncResp->res,
514 asyncResp,
515 [asyncResp, serverType, localRole,
520 messages::internalError(asyncResp->res);
524 asyncResp->res
720 * @param asyncResp pointer to the JSON response
727 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
731 setDbusProperty(asyncResp, ldapServerElementName + "/ServiceAddress",
739 * @param asyncResp pointer to the JSON response
746 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
750 setDbusProperty(asyncResp,
759 * @param asyncResp pointer to the JSON response
766 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
770 setDbusProperty(asyncResp,
780 * @param asyncResp pointer to the JSON response
787 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
791 setDbusProperty(asyncResp,
801 * @param asyncResp pointer to the JSON response
808 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
813 asyncResp,
822 * @param asyncResp pointer to the JSON response
829 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
834 asyncResp,
843 * @param asyncResp pointer to the JSON response
849 bool serviceEnabled, const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
853 setDbusProperty(asyncResp, ldapServerElementName + "/ServiceEnabled",
868 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
879 asyncResp->res,
892 asyncResp->res,
904 asyncResp->res,
916 asyncResp->res,
928 asyncResp->res,
940 messages::actionNotSupported(asyncResp->res,
950 messages::success(asyncResp->res);
957 * @param asyncResp pointer to the JSON response
977 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
998 messages::propertyValueNotInList(asyncResp->res, *input.authType,
1008 asyncResp->res, *input.serviceAddressList, "ServiceAddress");
1016 messages::propertyValueNotInList(asyncResp->res, *input.baseDNList,
1033 getLDAPConfigData(serverType, [asyncResp, input = std::move(input),
1040 messages::internalError(asyncResp->res);
1043 parseLDAPConfigData(asyncResp->res.jsonValue, confData, serverT);
1048 handleServiceEnablePatch(false, asyncResp, serverT, dbusObjectPath);
1053 handleServiceAddressPatch(*input.serviceAddressList, asyncResp,
1058 handleUserNamePatch(*input.userName, asyncResp, serverT,
1063 handlePasswordPatch(*input.password, asyncResp, serverT,
1069 handleBaseDNPatch(*input.baseDNList, asyncResp, serverT,
1074 handleUserNameAttrPatch(*input.userNameAttribute, asyncResp,
1079 handleGroupNameAttrPatch(*input.groupsAttribute, asyncResp, serverT,
1089 handleServiceEnablePatch(*input.serviceEnabled, asyncResp,
1098 handleServiceEnablePatch(confData.serviceEnabled, asyncResp,
1104 handleRoleMapPatch(asyncResp, confData.groupRoleList, serverT,
1124 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
1129 messages::resourceNotFound(asyncResp->res, "ManagerAccount",
1140 messages::resourceNotFound(asyncResp->res, "ManagerAccount",
1146 messages::propertyValueFormatError(asyncResp->res, nullptr,
1152 messages::internalError(asyncResp->res);
1168 asyncResp, "Enabled", "xyz.openbmc_project.User.Manager",
1178 messages::propertyValueNotInList(asyncResp->res, true, "Locked");
1181 setDbusProperty(asyncResp, "RoleId", "xyz.openbmc_project.User.Manager",
1194 messages::propertyValueNotInList(asyncResp->res, "true", "Locked");
1197 setDbusProperty(asyncResp, "Locked", "xyz.openbmc_project.User.Manager",
1205 patchAccountTypes(*params.accountTypes, asyncResp,
1211 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
1228 std::bind_front(afterVerifyUserExists, asyncResp, std::move(params)));
1233 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
1235 if (!redfish::setUpRedfishRoute(app, req, asyncResp))
1239 asyncResp->res.addHeader(
1245 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
1254 collection_util::getCollectionToKey(asyncResp, url, interfaces, path,
1260 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
1263 if (!redfish::setUpRedfishRoute(app, req, asyncResp))
1268 asyncResp->res.addHeader(
1275 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp, const std::string& id)
1277 if (!redfish::setUpRedfishRoute(app, req, asyncResp))
1288 asyncResp, objPath,
1295 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
1297 if (!redfish::setUpRedfishRoute(app, req, asyncResp))
1302 asyncResp->res.addHeader(
1309 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
1311 if (!redfish::setUpRedfishRoute(app, req, asyncResp))
1316 nlohmann::json& json = asyncResp->res.jsonValue;
1322 getClientCertificates(asyncResp, "/Members"_json_pointer);
1353 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
1355 if (!redfish::setUpRedfishRoute(app, req, asyncResp))
1362 messages::internalError(asyncResp->res);
1369 asyncResp->res.addHeader(
1373 nlohmann::json& json = asyncResp->res.jsonValue;
1403 messages::internalError(asyncResp->res);
1418 asyncResp,
1442 asyncResp->res.jsonValue["LDAP"]["Certificates"]["@odata.id"] =
1448 [asyncResp](const boost::system::error_code& ec,
1452 messages::internalError(asyncResp->res);
1471 messages::internalError(asyncResp->res);
1477 asyncResp->res.jsonValue["MinPasswordLength"] =
1483 asyncResp->res.jsonValue["AccountLockoutDuration"] =
1489 asyncResp->res.jsonValue["AccountLockoutThreshold"] =
1494 auto callback = [asyncResp](bool success, const LDAPConfigData& confData,
1500 parseLDAPConfigData(asyncResp->res.jsonValue, confData, ldapType);
1558 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
1560 if (!redfish::setUpRedfishRoute(app, req, asyncResp))
1576 req, asyncResp->res, //
1638 messages::propertyValueNotInList(asyncResp->res, "HttpBasicAuth",
1646 app, req, asyncResp->res, *respondToUnauthenticatedClients);
1651 handleCertificateMappingAttributePatch(asyncResp->res,
1658 asyncResp, "MinPasswordLength", "xyz.openbmc_project.User.Manager",
1666 messages::propertyNotWritable(asyncResp->res, "MaxPasswordLength");
1669 handleLDAPPatch(std::move(activeDirectoryObject), asyncResp,
1671 handleLDAPPatch(std::move(ldapObject), asyncResp, "LDAP");
1673 handleAuthMethodsPatch(asyncResp, auth);
1678 asyncResp, "AccountLockoutDuration",
1687 asyncResp, "AccountLockoutThreshold",
1697 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
1699 if (!redfish::setUpRedfishRoute(app, req, asyncResp))
1703 asyncResp->res.addHeader(
1710 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
1712 if (!redfish::setUpRedfishRoute(app, req, asyncResp))
1719 messages::internalError(asyncResp->res);
1723 asyncResp->res.addHeader(
1727 asyncResp->res.jsonValue["@odata.id"] =
1729 asyncResp->res.jsonValue["@odata.type"] = "#ManagerAccountCollection."
1731 asyncResp->res.jsonValue["Name"] = "Accounts Collection";
1732 asyncResp->res.jsonValue["Description"] = "BMC User Accounts";
1745 [asyncResp, thisUser, effectiveUserPrivileges](
1750 messages::internalError(asyncResp->res);
1760 nlohmann::json& memberArray = asyncResp->res.jsonValue["Members"];
1768 messages::internalError(asyncResp->res);
1788 asyncResp->res.jsonValue["Members@odata.count"] =
1794 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
1800 userErrorMessageHandler(m.get_error(), asyncResp, username, "");
1815 asyncResp,
1816 [asyncResp, password](const boost::system::error_code& ec3) {
1819 messages::internalError(asyncResp->res);
1824 messages::propertyValueFormatError(asyncResp->res, nullptr,
1834 messages::created(asyncResp->res);
1835 asyncResp->res.addHeader("Location",
1840 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
1852 if (!getUserGroupFromAccountType(asyncResp->res, *accountTypes,
1891 asyncResp->res.result(boost::beast::http::status::bad_request);
1904 messages::internalError(asyncResp->res);
1908 asyncResp,
1909 [asyncResp, username, password](const boost::system::error_code& ec2,
1911 processAfterCreateUser(asyncResp, username, password, ec2, m);
1920 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
1922 if (!redfish::setUpRedfishRoute(app, req, asyncResp))
1932 req, asyncResp->res, //
1947 messages::propertyValueNotInList(asyncResp->res, roleId, "RoleId");
1958 [asyncResp, username, password{std::move(password)}, roleId, enabled,
1964 messages::internalError(asyncResp->res);
1970 messages::internalError(asyncResp->res);
1974 processAfterGetAllGroups(asyncResp, username, password, roleId,
1981 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
1984 if (!redfish::setUpRedfishRoute(app, req, asyncResp))
1988 asyncResp->res.addHeader(
1995 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
1998 if (!redfish::setUpRedfishRoute(app, req, asyncResp))
2002 asyncResp->res.addHeader(
2009 messages::resourceNotFound(asyncResp->res, "ManagerAccount",
2016 messages::internalError(asyncResp->res);
2033 messages::insufficientPrivilege(asyncResp->res);
2041 [asyncResp,
2046 messages::internalError(asyncResp->res);
2059 messages::resourceNotFound(asyncResp->res, "ManagerAccount",
2064 asyncResp->res.jsonValue["@odata.type"] =
2066 asyncResp->res.jsonValue["Name"] = "User Account";
2067 asyncResp->res.jsonValue["Description"] = "User Account";
2068 asyncResp->res.jsonValue["Password"] = nullptr;
2069 asyncResp->res.jsonValue["StrictAccountTypes"] = true;
2089 messages::internalError(asyncResp->res);
2095 messages::internalError(asyncResp->res);
2098 asyncResp->res.jsonValue["Enabled"] = *userEnabled;
2105 messages::internalError(asyncResp->res);
2108 asyncResp->res.jsonValue["Locked"] = *userLocked;
2112 asyncResp->res.jsonValue["Locked@Redfish.AllowableValues"] =
2119 messages::internalError(asyncResp->res);
2126 messages::internalError(asyncResp->res);
2129 asyncResp->res.jsonValue["RoleId"] = role;
2132 asyncResp->res.jsonValue["Links"]["Role"];
2139 messages::internalError(asyncResp->res);
2142 asyncResp->res.jsonValue["PasswordChangeRequired"] =
2148 messages::internalError(asyncResp->res);
2151 if (!translateUserGroup(*userGroups, asyncResp->res))
2154 messages::internalError(asyncResp->res);
2160 asyncResp->res.jsonValue["@odata.id"] = boost::urls::format(
2162 asyncResp->res.jsonValue["Id"] = accountName;
2163 asyncResp->res.jsonValue["UserName"] = accountName;
2169 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
2172 if (!redfish::setUpRedfishRoute(app, req, asyncResp))
2180 messages::resourceNotFound(asyncResp->res, "ManagerAccount", username);
2188 asyncResp,
2189 [asyncResp, username](const boost::system::error_code& ec) {
2192 messages::resourceNotFound(asyncResp->res, "ManagerAccount",
2197 messages::accountRemoved(asyncResp->res);
2205 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
2208 if (!redfish::setUpRedfishRoute(app, req, asyncResp))
2215 messages::resourceNotFound(asyncResp->res, "ManagerAccount", username);
2227 messages::internalError(asyncResp->res);
2243 req, asyncResp->res, //
2260 messages::insufficientPrivilege(asyncResp->res);
2265 if (!json_util::readJsonPatch(req, asyncResp->res, "Password",
2279 updateUserProperties(asyncResp, username, password, enabled, roleId,
2284 asyncResp,
2285 [asyncResp, username, password(std::move(password)),
2292 userErrorMessageHandler(m.get_error(), asyncResp, newUser,
2297 updateUserProperties(asyncResp, newUser, password, enabled, roleId,