本文整理汇总了PHP中AuthenticationController::verify方法的典型用法代码示例。如果您正苦于以下问题:PHP AuthenticationController::verify方法的具体用法?PHP AuthenticationController::verify怎么用?PHP AuthenticationController::verify使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AuthenticationController
的用法示例。
在下文中一共展示了AuthenticationController::verify方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
Crave::requireFiles(CONTROLLER, array('AuthenticationController', 'HospitalDetailsController'));
$hospital_info = (new HospitalDetailsController())->getHospitalDetails();
$hospital_name = $hospital_info['name'];
if (isset($_REQUEST['intent'])) {
$intent = $_REQUEST['intent'];
} else {
echo JsonResponse::error('Intent not set!');
exit;
}
if ($intent == 'login') {
if (isset($_REQUEST['regNo'], $_REQUEST['passcode'])) {
$credentials = array();
$credentials[UserAuthTable::regNo] = $_REQUEST['regNo'];
$credentials[UserAuthTable::passcode] = $_REQUEST['passcode'];
$authenticator = new AuthenticationController();
$verify = $authenticator->verify($credentials);
if (is_array($verify)) {
if ($verify[P_STATUS] == STATUS_OK) {
//SET SESSION VARIABLES
$user_credentials = $verify[P_DATA];
foreach ($user_credentials as $key => $value) {
CxSessionHandler::setItem($key, $value);
}
CxSessionHandler::setItem(HOSPITAL_NAME, $hospital_name);
// ADD HOSPITAL NAME TO SESSION
//CONSTRUCT RESPONSE
$response = array();
$response[UserAuthTable::status] = $user_credentials[UserAuthTable::status];
$response[P_MESSAGE] = $verify[P_MESSAGE];
//ECHO RESPONSE
echo JsonResponse::success($response);
示例2: callVerifyForToken
/**
* Calls the Authentication Controller's verify function
* @param string
* @return string
*/
private function callVerifyForToken($token = NULL)
{
return AuthenticationController::verify($token);
}