Lines Matching +full:user +full:- +full:otp
8 // http://www.apache.org/licenses/LICENSE-2.0
29 #include <phosphor-logging/elog-errors.hpp>
30 #include <phosphor-logging/elog.hpp>
31 #include <phosphor-logging/lg2.hpp>
33 #include <xyz/openbmc_project/User/Common/error.hpp>
40 namespace user namespace
51 sdbusplus::xyz::openbmc_project::User::Common::Error::NoResource;
56 static constexpr auto authAppPath = "/usr/bin/google-authenticator";
59 "/home/{}/.config/phosphor-user-manager/.google_authenticator.tmp";
63 * @param[in] bus - sdbusplus handler
64 * @param[in] path - D-Bus path
65 * @param[in] groups - users group list
66 * @param[in] priv - user privilege
67 * @param[in] enabled - user enabled state
68 * @param[in] parent - user manager - parent object
80 this->emit_object_added(); in Users()
86 /** @brief delete user method.
87 * This method deletes the user as requested
95 /** @brief update user privilege
97 * @param[in] value - User privilege
119 /** @brief list user privilege
127 /** @brief update user groups
129 * @param[in] value - User groups
142 /** @brief list user groups
150 /** @brief lists user enabled state
163 /** @brief update user enabled state
165 * @param[in] value - bool value
177 /** @brief lists user locked state for failed attempt
185 /** @brief unlock user locked state for failed attempt
187 * @param[in]: value - false - unlock user account, true - no action taken
201 /** @brief indicates if the user's password is expired
211 // Get the user ID in changeFileOwnership()
215 lg2::error("Failed to get user ID for user:{USER}", "USER", userName); in changeFileOwnership()
219 if (chown(filePath.c_str(), pwd->pw_uid, pwd->pw_gid) != 0) in changeFileOwnership()
245 -u no-rate-limit in createSecretKey()
246 -W minimal-window in createSecretKey()
247 -Q qr-mode (NONE, ANSI, UTF8) in createSecretKey()
248 -t time-based in createSecretKey()
249 -f force file in createSecretKey()
250 -d disallow-reuse in createSecretKey()
251 -C no-confirm no confirmation required for code provisioned in createSecretKey()
253 executeCmd(authAppPath, "-s", path.c_str(), "-u", "-W", "-Q", "NONE", "-t", in createSecretKey()
254 "-f", "-d", "-C"); in createSecretKey()
257 lg2::error("Failed to create secret key for user {USER}", "USER", in createSecretKey()
276 bool Users::verifyOTP(std::string otp) in verifyOTP() argument
278 if (Totp::verify(getUserName(), otp) == PAM_SUCCESS) in verifyOTP()
280 // If MFA is enabled for the user register the secret key in verifyOTP()
327 iter->second(*this); in bypassedProtocol()
342 inline void googleAuthenticatorEnabled(Users& user, bool /*unused*/) in googleAuthenticatorEnabled() argument
344 clearGoogleAuthenticator(user); in googleAuthenticatorEnabled()
356 iter->second(*this, value); in enableMultiFactorAuth()
389 } // namespace user