I'v developed a OAuth2.0 Client.The initial goal was to make a simple client where people won't have to focus on it to much ,and where they can start coding their product immediately by just including a few lines of code(client).There is a SQLite3 database which records all the access_tokens and refresh_tokens.Also it handles the expiration of access_tokens(if able to obtain new one).Please criticize as much as posible i want to learnThe steps to include the project:1.Download via composer or github:composer require tech-387/o-auth2:v0.1-alpha2.Setup the client://set json context typeheader('Content-Type: application/json');//Errorsini_set('display_errors', 1);ini_set('display_startup_errors', 1);error_reporting(E_ALL);//require autoloadrequire_once __DIR__.'/../vendor/autoload.php';//Clientuse Discus\Client as Client;//Client Configurationuse Discus\Configuration\ClientConfiguration as ClientConfiguration;//Setup the user configuration$clintData = new ClientConfiguration('testclient','testpass','http://localhostt.com:9000/example/','http://oauth2:9000/token.php');//Setup the client$client = new Client($clintData,'mysqlitedb.sqlite'); //Autorize the clientecho $client->autorizeClient();3.Call the api that you want(google play developer for example):<?phprequire_once 'index.php';/*** Setup Call for google oauth server*/$client->callApi()->headerBearerAuthorization()                  ->get();$url = '';//Execute call$response = $client->callApi()->execute($url);if($response == 'recal'){    $response = $client->callApi()->execute($url);}else {    echo $response;}The framework it self:Here is the structure:W. README.md composer.json composer.lock discus_logo.png example    apiCall.php    index.php    mysqlitedb.sqlite src    Discus        CallApi.php        Client.php        Configuration           ClientConfiguration.php        Database           DatabaseHelper.php        GrantTypeHandlers           AccessTokenHandler.php           AutorizationHandler.php           RefreshTokenHandler.php        Helpers            AutorizationJsonDecoder.php            CurlHelper                CurlBuilder.php tests     StackTest.phpThe Client.php is(if i can call it this way) bootstrap file, everything goes over it.//Api calluse Discus\CallApi as CallApi;class Client {    //Grand Type Helper    private $autorizationHandler;    private $refreshTokenHandler;    private $accessTokenHandler;    //Client Configuration    private $configurationClient;    //Sqlite     private $Sqlite3;    //Authorization code    private $code = null;    //Api Call Helper    private $callApi = null;    public function __construct(ClientConfiguration $client_config,$tablePath = []){        //Pass the table path        $this->Sqlite3 = new DatabaseHelper($tablePath);        //Get Autorization Code        $this->code = $this->getCode();        //Set configuration to private var        $this->configurationClient = $client_config;        //Construct refresh token        $this->refreshTokenHandler = new RefreshTokenHandler($this->Sqlite3,$this->configurationClient);        //Construct access token        $this->accessTokenHandler = new AccessTokenHandler($this->Sqlite3);        //Construct Call Api Helper        $this->callApi = new CallApi($this->accessTokenHandler,$this->refreshTokenHandler,$this->configurationClient);    }    /**    * Call the autorization process    */    public function autorizeClient()    {        //Call the Autorization Handler        if($this->code !== null){            $this->autorizationHandler = new AutorizationHandler($this->code,$this->configurationClient,$this->Sqlite3);            return $this->autorizationHandler->addTokens();        }    }    /**    * Call to Api Resource    */    public function callApi()    {        $output = $this->callApi;        return $output;    }    /**    * Get autorization code    */    public function getCode()    {        $autorizationCode = null;        if(isset($_GET['code'])){            $autorizationCode = trim($_GET['code']);        }        return $autorizationCode;    }Here is the full project on github,also i have commented out the code a lot.And thanks to @Mike Brant i have started to write more clear code. There is a lot to do with it ,to add unit testing, to add design patterns...and much more...I'm having issues since I'm new to all of it..Which design patterns could i use at which part of the project?But i wanted to see if the start is good?What would you change?
OAuth2.0 Client framework
php;oauth