Download the PHP package hannesvdvreken/php-oauth without Composer

On this page you can find all versions of the php package hannesvdvreken/php-oauth. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-oauth

OAuth service classes with Guzzle (v4 and v5, but not v6)

Build Status Latest Stable Version Total Downloads Coverage Status

Usage

Let's dive right in.

Setup

Some possible configuration can be passed on with the constructor, like so:

An alternative way is the following:

The service class also has the following getters:

The GuzzleHttp\Client underneath can be accessed like so:

Requesting an API

The internal GuzzleHttp\Client can be called by calling the same methods on the service class.

or

The internal Guzzle Client will be called with the right token in the header or GET parameter. All you need to do is load the service class with the correct credentials or tokens from your persistance layer or session.

Laravel 4

If you're using Laravel 4, feel free to register the contained service provider (OAuth\Support\ServiceProvider). Register the OAuth class alias for the facade to use the following syntax to get a fully configured service class:

To create an empty config file in app/config/packages just use the artisan command:

OAuth 1.0a

For the OAuth1.0a functionality we internally use the Guzzle OAuth1 subscriber. An example:

Or in short, the authorizationUrl will call the requestToken method, if you haven't done so already:

In the callback controller...

OAuth 2

The OAuth2 flow is easier.

In the callback controller...

Supported services

Guzzle v3

If you want to continue to work with the old versions of this library that leveraged Guzzle v3 (Guzzle\Http\Client instead of GuzzleHttp\Client) then you might want to install the 0.1.* releases. Pull request with Guzzle v3 compatibility should be made against the guzzle3 branch. Install the latest guzzle v3 version with 0.1.* or dev-guzzle3.

Contributing

Feel free to make a pull request. A new service class can be as simple as 22 lines of code. Please try to be as PSR-2 compliant as possible. There's no shame if you misplaced a bracket or so!

Testing

After installing the dependencies (composer install) you just need to run phpunit to run the entire test-suite.

License

MIT


All versions of php-oauth with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
guzzlehttp/guzzle Version ~4|~5
guzzlehttp/oauth-subscriber Version 0.1.*
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package hannesvdvreken/php-oauth contains the following files

Loading the files please wait ....