The OAuth extension provides OAuth consumer and provider bindings. OAuth is an authorization protocol built on top of HTTP which allows applications to securely access data without having to store usernames and passwords.
To install this extension on PHP 7.X, run the following commands as your server's root user:
sudo apt-get -y install gcc make autoconf libc-dev pkg-config libpcre3-dev sudo pecl7.X-sp install oauth
Once installed, create a configuration file for the extension and restart PHP by running the following commands as root:
sudo bash -c "echo extension=oauth.so > /etc/php7.X-sp/conf.d/oauth.ini" sudo service php7.X-fpm-sp restart
To install this extension on PHP 5.X, run the following commands as your server's root user:
sudo apt-get -y install gcc make autoconf libc-dev pkg-config sudo pecl5.X-sp install oauth-1.2.3
Once installed, create a configuration file for the extension and restart PHP by running the following commands as root:
sudo bash -c "echo extension=oauth.so > /etc/php5.X-sp/conf.d/oauth.ini" sudo service php5.X-fpm-sp restart
You can verify the oauth extension is installed correctly by running this command:
phpX.Y-sp -i | grep -i "OAuth"
You should see output like the following:
OAuth OAuth support => enabled
To uninstall this extension, as root run the commands:
sudo rm /etc/phpX.Y-sp/conf.d/oauth.ini sudo peclX.Y-sp uninstall oauth
Next, restart PHP-FPM with the command:
sudo service phpX.Y-fpm-sp restart