本文整理匯總了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);
}