Download the PHP package webiny/oauth2 without Composer

On this page you can find all versions of the php package webiny/oauth2. 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 oauth2

OAuth2 Wrappers

This component provides wrappers for several OAuth2 systems like Facebook, LinkedIn and Google. After you have gained OAuth2 access token, you can use this wrapper to communicate with the the desired service.

Install the component

The best way to install the component is using Composer.

For additional versions of the package, visit the Packagist page.

Supported OAuth2 servers

Current supported OAuth2 servers are:

Configuring the component

To use the component, you first need to configure it. The configuration is done by defining the following params:

Example configuration:

Usage

This component depends on users access token, without it no API call to the OAuth2 server can be made. To get the access token, please read the implementation guide for a specific server you wish to use. OAuth2 components is also integrated with the Security component as a user and authentication provider, automating the process of getting the required auth token.

Example:

Registering additional servers

First create a class that extends \Webiny\Component\OAuth2\AbstractServer and then implement the abstract methods. All of the abstract methods are described inside AbstractServer class, and additionally you should also check out how implementations of current servers looks like. They are located in \Webiny\Component\OAuth2\Server folder.

Once you have implemented your logic for the abstract methods, it's time to register the class with the OAuth2 component. In order to do so, inside your config file, set the value of Server property to your newly created class.

And you're done! To use it, just configure it the same way as the built in classes.

Notice

The code on this component is not fully covered by unit test. Only main classes are tested, while tests for Bridge and Server still need to be written.

Resources

To run unit tests, you need to use the following command:

$ cd path/to/Webiny/Component/OAuth2/
$ composer.phar install
$ phpunit

All versions of oauth2 with dependencies

PHP Build Version
Package Version
Requires php Version ^7
webiny/http Version ~1.6
webiny/config Version ~1.6
webiny/std-lib Version ~1.6
league/oauth2-client Version 0.8.*
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 webiny/oauth2 contains the following files

Loading the files please wait ....