/** * @param string $jump_url * @return null|\Overtrue\Wechat\Utils\Bag */ public function authorizeUser($jump_url) { $appId = $this->_appId; $secret = $this->_secret; $auth = new Auth($appId, $secret); $result = $auth->authorize(url($jump_url), 'snsapi_base,snsapi_userinfo'); \Session::put('web_token', $result->get('access_token')); return $auth->getUser($result->get('openid'), $auth->access_token); }