chillerlan / php-oauth-core
A PHP OAuth client core library
Fund package maintenance!
Ko Fi
www.paypal.com/donate?hosted_button_id=WLYUNAT9ZTJZ4
Installs: 2 431
Dependents: 2
Suggesters: 0
Security: 0
Stars: 7
Watchers: 3
Forks: 1
Open Issues: 0
Requires
- php: ^7.4 || ^8.0
- ext-curl: *
- ext-json: *
- ext-simplexml: *
- ext-zlib: *
- chillerlan/php-httpinterface: ^5.0
- psr/http-client: ^1.0
- psr/http-message: ^1.0
- psr/log: ^1.1
Requires (Dev)
- phan/phan: ^4.0
- phpunit/phpunit: ^9.5
Provides
README
A PHP OAuth1/2 client, loosely based on Lusitanian/PHPoAuthLib.
Documentation
See the wiki for advanced documentation. An API documentation created with phpDocumentor can be found at https://chillerlan.github.io/php-oauth-core/ (WIP).
Requirements
- PHP 8.1+
- extensions:
curl
,json
,simplexml
,sodium
,zlib
- extensions:
- a PSR-18 compatible HTTP client library of your choice (there is one included, though)
- optional PSR-17 compatible Request-, Response- and UriFactories
- see
chillerlan/php-oauth-providers
for already implemented providers
Installation
requires composer
composer.json
(note: replace dev-main
with a version boundary)
{ "require": { "php": "^8.1", "chillerlan/php-oauth-core": "dev-main" } }
In case you want to keep using dev-main
, specify the hash of a commit to avoid running into unforeseen issues like so: dev-main#ff85785139b9531a6c29d41cc161e4878d54491d
Profit!
Disclaimer
OAuth tokens are secrets and should be treated as such. Store them in a safe place,
consider encryption.
I won't take responsibility for stolen auth tokens. Use at your own risk.