Download the PHP package jdelaune/oauth2-client-bundle without Composer

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

OAuth2 Client Bundle

OAuth2 Client Bundle for Symfony 2-5.

Overview

Allow for the protection of resources via OAuth2. Provides two Symfony firewalls. One for checking bearer access tokens for securing API application. The access tokens can be provided via a header (recommended) or query e.g. Authorization: Bearer {Access Token} or http://example.com/resource?access_token={Access Token}. The other firewall is for securing web applications via the authorization code grant type.

Installation

Step 1: Add package to Composer

Add the bundle to your composer.json:

Now tell composer to download the bundle by running the command:

Composer will install the bundle to your project's vendor/jdelaune directory.

Step 2: Enable the bundle

Enable the bundle in the kernel:

Step 3: Add parameters

You'll need add your OAuth2 Server URIs as parameters to your parameters.yml

The verify uri should verify the access token on your OAuth2 Server and provide a JSON encoded array of:

Step 4a: Configure security (access token)

Access token only firewall is most often used for securing APIs where the end user won't actually be interacting with your Symfony application directly.

You'll need to setup a firewall in your security.yml

Step 4b: Configure security (authorization code)

Authorization code firewall is most often used when the end user is interacting with your Symfony application.

You'll need to setup a firewall in your security.yml

The redirect_uri needs to be a URI behind the same firewall. You can use all the usual configuration options here as well that one would use for the form firewall like use_referer and default_target_path.

Step 5: Add routing

We provide default routing for some paths needed when using the authorization code firewall. Add this to your routing.yml

The OAuth2Token

The client bundle will provide an OAuth2Token object for any secured path in your controllers.

There are additional getters available on the OAuth2User object:

The OAuth2User

The client bundle will provide an OAuth2User object for any secured path in your controllers.

Scopes will be turned into roles automatically, e.g. a scope of email would result in a role of ROLE_EMAIL.

There are additional getters available on the OAuth2User object:


All versions of oauth2-client-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0.0
guzzlehttp/guzzle Version ^6.0
symfony/framework-bundle Version ^3.0 || ^4.0 || ^5.0
symfony/security-bundle Version ^3.0 || ^4.0 || ^5.0
sensio/framework-extra-bundle Version ^5.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 jdelaune/oauth2-client-bundle contains the following files

Loading the files please wait ....