Download the PHP package gregurco/guzzle-bundle-oauth2-plugin without Composer

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

Guzzle Bundle OAuth2 Plugin

Build Status Coverage Status SensioLabsInsight

This plugin integrates OAuth2 functionality into Guzzle Bundle, a bundle for building RESTful web service clients.


Prerequisites

Installation

To install this bundle, run the command below on the command line and you will get the latest stable version from Packagist.

Usage

Enable bundle

Find next lines in src/Kernel.php:

and replace them by:

Basic configuration

With default grant type (client)

With password grant type

With client credentials in body

Options

Key Description Required Example
base_uri URL of oAuth2 server. yes https://example.com
token_url The path that will be concatenated with base_uri.
Default: /oauth2/token
no /oauth/token
client_id The client identifier issued to the client during the registration process yes s6BhdRkqt3
client_secret The client secret no 7Fjfp0ZBr1KtDRbnfVdmIw
username The resource owner username for PasswordCredentials grant type johndoe
password The resource owner password for PasswordCredentials grant type A3ddj3w
auth_location The place where to put client_id and client_secret in auth request.
Default: headers. Allowed values: body, headers.
no body
resource The App ID URI of the web API (secured resource) no https://service.contoso.com/
private_key Path to private key for JwtBearer grant type "%kernel.root_dir%/path/to/private.key"
scope One or more scope values indicating which parts of the user's account you wish to access no administration
audience no
grant_type Grant type class path. Class should implement GrantTypeInterface.
Default: Sainsburys\\Guzzle\\Oauth2\\GrantType\\ClientCredentials
no Sainsburys\\Guzzle\\Oauth2\\GrantType\\PasswordCredentials
Sainsburys\\Guzzle\\Oauth2\\GrantType\\AuthorizationCode
Sainsburys\\Guzzle\\Oauth2\\GrantType\\JwtBearer
persistent Token will be stored in session unless grant_type is client credentials; in which case it will be stored in the app cache.
Default: false
no
retry_limit How many times request will be repeated on failure.
Default: 5
no

See more information about middleware here.

License

This middleware is licensed under the MIT License - see the LICENSE file for details


All versions of guzzle-bundle-oauth2-plugin with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
guzzlehttp/guzzle Version ^6.5.8|^7.4.5
eightpoints/guzzle-bundle Version ^8.0
symfony/http-kernel Version ~5.0|~6.0|~7.0
symfony/config Version ~5.0|~6.0|~7.0
symfony/dependency-injection Version ~5.0|~6.0|~7.0
symfony/expression-language Version ~5.0|~6.0|~7.0
sainsburys/guzzle-oauth2-plugin Version ^3.0
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 gregurco/guzzle-bundle-oauth2-plugin contains the following files

Loading the files please wait ....