Example #1
0
/**
 * @brief Console callback for handling the web auth
 * @sa WEB_Auth
 */
static void WEB_Auth_f (void)
{
	if (Cmd_Argc() != 3) {
		Com_Printf("Usage: %s <username> <password>\n", Cmd_Argv(0));
		return;
	}
	if (WEB_Auth(Cmd_Argv(1), Cmd_Argv(2))) {
		UI_ExecuteConfunc("web_authsuccessful");
	} else {
		UI_ExecuteConfunc("web_authfailed");
	}
}
Example #2
0
TEST_F(WebApiTest, Auth)
{
	if (Q_strnull(user) || Q_strnull(password))
		return;
	ASSERT_TRUE(WEB_Auth(user, password));
}