/**
  * 登录退出
  */
 public function getOut(LoginProcess $loginProcess)
 {
     $loginProcess->getProcess()->logout();
     return redirect(url('/'));
 }
示例#2
0
 /**
  * 修改自己的密码
  */
 public function mpassword(UserModifyPassword $params, UserProcess $manager, LoginProcess $loginManager)
 {
     $params->setOldPassword(Request::input('old_password'))->setNewPassword(Request::input('new_password'))->setNewPasswordRepeat(Request::input('new_password_repeat'));
     if (!$manager->modifyPassword($params)) {
         return responseJson($manager->getErrorMessage());
     }
     $loginManager->getProcess()->logout();
     return responseJson(Lang::get('common.action_success'), true);
 }
示例#3
0
 /**
  * 初始化登录,返回加密密钥
  *
  * @param App\Services\Login\Process $loginProcess 登录核心处理
  * @access public
  */
 public function getPrelogin(LoginProcess $loginProcess)
 {
     $publicKey = $loginProcess->getProcess()->setPublicKey();
     return response()->json(['pKey' => $publicKey, 'a' => csrf_token()])->setCallback(Request::input('callback'));
 }