org\oauth\driver\Github::parseToken PHP Method

parseToken() protected method

解析access_token方法请求后的返回值
protected parseToken ( string $result )
$result string 获取access_token的方法的返回值
    protected function parseToken($result)
    {
        parse_str($result, $data);
        if ($data['access_token'] && $data['token_type']) {
            $data['openid'] = $this->getOpenId();
            return $data;
        } else {
            throw new \Exception("获取 Github ACCESS_TOKEN出错:未知错误");
        }
    }