Ejemplo n.º 1
0
 /**
  * 登陆回调页面
  */
 function callback()
 {
     $mod = $this->_get('mod', 'trim');
     !$mod && $this->_404();
     $callback_type = cookie('callback_type');
     $oauth = new oauth($mod);
     $rk = $oauth->NeedRequest();
     $request_args = array();
     foreach ($rk as $v) {
         $request_args[$v] = $this->_get($v);
     }
     switch ($callback_type) {
         case 'login':
             $url = $oauth->callbackLogin($request_args);
             break;
         case 'bind':
             $url = $oauth->callbackbind($request_args);
             break;
         default:
             $url = U('index/index');
             break;
     }
     cookie('callback_type', null);
     redirect($url);
 }