carlos-mg89 / oauth
PHP 7.2 oAuth 1/2 Library
Installs: 142 437
Dependents: 3
Suggesters: 0
Security: 0
Stars: 4
Watchers: 2
Forks: 454
Open Issues: 3
Requires
- php: ^7.2 || ^8.0
Requires (Dev)
- ext-curl: *
- ext-dom: *
- ext-json: *
- friendsofphp/php-cs-fixer: ^3.0
- phpunit/phpunit: ^8.5
- predis/predis: 0.8.*@dev
- squizlabs/php_codesniffer: ^3.5
- symfony/finder: ^5.1
- symfony/http-foundation: ~2.1
- symfony/var-dumper: ^5.1
Suggests
- ext-openssl: Allows for usage of secure connections with the stream-based HTTP client.
- predis/predis: Allows using the Redis storage backend.
- symfony/http-foundation: Allows using the Symfony Session storage backend.
Replaces
- lusitanian/oauth: ~0.3
- v2.0.x-dev
- v1.0.x-dev
- 0.8.16
- 0.8.15
- 0.8.14
- 0.8.13
- 0.8.12
- v0.8.11
- v0.8.10
- v0.8.9
- v0.8.8
- v0.8.7
- v0.8.6
- v0.8.5
- v0.8.4
- v0.8.3
- v0.8.2
- v0.8.1
- v0.8.0
- v0.7.1
- v0.7.0
- v0.6.2
- v0.6.1
- v0.6.0
- v0.5.5
- v0.5.4
- v0.5.3
- v0.5.2
- v0.5.1
- v0.5.0
- v0.4.1
- v0.4.0
- v0.3.6
- v0.3.5
- v0.3.0
- v0.2.5
- v0.2.4
- v0.2.3
- v0.2.2
- v0.2.1
- v0.2.0
- dev-master / 0.1.x-dev
- v0.1.4
- v0.1.3
- v0.1.2
- v0.1.1
- v0.1.0
- dev-pull/556
- dev-pull/552
This package is auto-updated.
Last update: 2024-11-09 10:31:27 UTC
README
PHPoAuthLib provides oAuth support in PHP 7.2+ and 8.0+. It's very easy to integrate with any project which requires an oAuth client.
Installation
This library can be found on Packagist. The recommended way to install this is through composer.
composer require carlos-mg89/oauth
Features
- PSR-4
- Fully extensible in every facet.
- You can implement any service with any custom requirements by extending the protocol version's
AbstractService
implementation. - 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
OAuth\Common\Token\TokenStorageInterface
.
- You can implement any service with any custom requirements by extending the protocol version's
Service support
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
- OAuth1
- 500px
- BitBucket
- Etsy
- FitBit
- Flickr
- QuickBooks
- Scoop.it!
- Tumblr
- Yahoo
- OAuth2
- Amazon
- BitLy
- Bitrix24
- Box
- Buffer
- Dailymotion
- Delicious
- Deezer
- DeviantArt
- Dropbox
- Eve Online
- Foursquare
- GitHub
- Harvest
- Heroku
- Hubic
- Jawbone UP
- Mailchimp
- Microsoft
- Mondo
- Nest
- Netatmo
- Parrot Flower Power
- PayPal
- RunKeeper
- Salesforce
- SoundCloud
- Spotify
- Strava
- Stripe
- Ustream
- Vimeo
- Vkontakte
- Yahoo
- Yammer
- more to come!
Examples
php -S localhost:8000 -t examples
Then point your browser to:
http://localhost:8000/
Usage
For usage with complete auth flow, please see the examples. More in-depth documentation will come with release 1.0.
Framework Integration
- 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.
Extensions
- Extract normalized user data from OAuth Services with the library PHPoAuthUserData by Luciano Mammino
Tests
composer tests