NOTE: I'm looking for someone who could help to maintain this package alongside me, just because I don't have a ton of time to devote to it. However, I'm still going to keep trying to pay attention to PRs, etc.
PHPoAuthLib provides oAuth support in PHP 7.2+ and is very easy to integrate with any project which requires an oAuth client.
This library can be found on Packagist.
The recommended way to install this is through composer.
composer require lusitanian/oauth
- Fully extensible in every facet.
- You can implement any service with any custom requirements by extending the protocol version's
- You can use any HTTP client you desire, just create a class utilizing it which implements
OAuth\Common\Http\ClientInterface (two implementations are included)
- You can use any storage mechanism for tokens. By default, session, in-memory and Redis.io (requires PHPRedis) storage mechanisms are included. Implement additional mechanisms by implementing
The library supports both oAuth 1.x and oAuth 2.0 compliant services. A list of currently implemented services can be found below.
Included service implementations
- Eve Online
- Jawbone UP
- Parrot Flower Power
- more to come!
php -S localhost:8000 -t examples
Then point your browser to:
For usage with complete auth flow, please see the examples. More in-depth documentation will come with release 1.0.
- Lithium: Sébastien Charrier has written an adapter for the library.
- Laravel 4: Dariusz Prząda has written a service provider for the library.
- Laravel 5: Valentin Ivaşcu ported Dariusz Prząda's Laravel 4 library to Laravel 5.
- Symfony: Alexander Pinnecke has written a Symfony Bundle for the library.
- Extract normalized user data from OAuth Services with the library PHPoAuthUserData by Luciano Mammino