Skip to content
This repository was archived by the owner on Mar 23, 2024. It is now read-only.

A PHP OAuth 1/2 client core library

License

Notifications You must be signed in to change notification settings

chillerlan/php-oauth-core

Repository files navigation

chillerlan/php-oauth-core

ATTENTION: This library has been abandoned and archive in favor of chillerlan/php-oauth

A framework.agnostic PHP OAuth1/2 client that acts as a PSR-18 HTTP client, fully PSR-7/PSR-17 compatible.

PHP Version SupportPackagist versionLicenseContinuous IntegrationCodeCovCodacyPackagist downloads

Documentation

https://php-oauth.readthedocs.io/

An API documentation created with phpDocumentor can be found at https://chillerlan.github.io/php-oauth-core/ (WIP). See the wiki for advanced documentation and chillerlan/php-oauth-providers for already implemented providers.

Requirements

  • PHP 8.1+
    • extensions: curl, json, simplexml, sodium, zlib
  • a PSR-18 compatible HTTP client library of your choice
  • PSR-17 compatible Request-, Response- and UriFactories

Installation

requires composer

composer.json (note: replace dev-main with a version boundary, e.g. ^5.0)

{ "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

Implemented Providers

ProviderAPI keysrevoke accessOAuthClientCredentials
Amazonlink2
BattleNetlinklink2
BigCartellinklink2
Bitbucketlink2
Deezerlinklink2
DeviantArtlinklink2
Discogslinklink1
Discordlink2
Flickrlinklink1
Foursquarelinklink2
GitHublinklink2
GitLablink2
Googlelinklink2
GuildWars2linklink2
Imgurlinklink2
LastFMlinklink-
MailChimplink2
Mastodonlinklink2
MicrosoftGraphlinklink2
Mixcloudlinklink2
MusicBrainzlinklink2
NPROnelink2
OpenCachinglinklink1
OpenStreetmaplink1
OpenStreetmap2link2
Patreonlink2
PayPallink2
PayPalSandboxlink2
Slacklinklink2
SoundCloudlinklink2
Spotifylinklink2
SteamOpenIDlink-
Stripelinklink2
Tumblrlinklink1
Tumblr2linklink2
Twitchlinklink2
Twitterlinklink1
TwitterCClinklink2
Vimeolinklink2
WordPresslinklink2
YouTubelinklink2

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.

close