本文整理汇总了PHP中Authenticate::verifyDetails方法的典型用法代码示例。如果您正苦于以下问题:PHP Authenticate::verifyDetails方法的具体用法?PHP Authenticate::verifyDetails怎么用?PHP Authenticate::verifyDetails使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Authenticate
的用法示例。
在下文中一共展示了Authenticate::verifyDetails方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionAuthenticate
public function actionAuthenticate()
{
$model = new Authenticate();
$authenticate_json = http_get_request_body();
//$authenticate_json = json_encode(array("username"=>"kailesh","password"=>"1c3dd8b850b055bb7b6fb0fb59a7cd4","deviceID"=>"90:C1:15:BC:97:4F"));
$model->verifyDetails($authenticate_json);
$verification = $model->getAccess();
$responseMsg = $model->generateJsonResponse();
//var_dump($responseMsg);
/*HttpResponse::status(200);
HttpResponse::setContentType('text/HTML');
HttpResponse::setData("Orders Recieved");
HttpResponse::send();*/
//var_dump($responseMsg);
if ($verification === true) {
HttpResponse::status(200);
HttpResponse::setContentType('application/json');
HttpResponse::setData($responseMsg);
HttpResponse::send();
} else {
HttpResponse::status(200);
HttpResponse::setContentType('application/json');
HttpResponse::setData($responseMsg);
HttpResponse::send();
}
}
开发者ID:nsawant942,项目名称:Canteen-Management-Software-System--Witwatersrand,代码行数:26,代码来源:MobileController.php
示例2: testUnknownUser
public function testUnknownUser()
{
$authenticate = new Authenticate();
$authenticate_json = json_encode(array("username" => "bob", "password" => "1c3dd8b823we055bb7b6fb0fb59a7cd04", "deviceID" => "85:D5:76:AA:97:4F"));
$authenticate->verifyDetails($authenticate_json);
$expected_response = json_encode(array("access" => false, "reason" => "RMB-01", "balance" => "0"));
$returned_response = $authenticate->generateJsonResponse();
$this->assertEquals($expected_response, $returned_response);
}
开发者ID:nsawant942,项目名称:Canteen-Management-Software-System--Witwatersrand,代码行数:9,代码来源:AuthenticationTest.php