Download the PHP package diglin/oauth2-oro-provider without Composer

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

OAuth2 Client for OroPlatform based applications

Introduction

This Symfony 4.x & 5.x Bundle allows you to authenticate and connect to OroPlatform based applications API via the OAUth2 protocol.

This bundle extends the league/oauth2-client dependency and will be automatically installed. Fur further information about the dependency, visit the url https://github.com/thephpleague/oauth2-client

Compatibility

Installation

Via composer:

composer require diglin/oauth2-oro-provider:^1.0

Configuration

The default configuration of DiglinOAuth2OroBundle is illustrated below:

Create a file at the path config/packages/diglin_oauth2_oro.yaml (you can set also this file at environment level, like into the prod or dev folder.) with the following content example:

As stated in Oro Documentation:

The Client Credentials type is used for machine-to-machine authentication (e.g. in a cron job that performs maintenance tasks over an API) and Password is used by trusted first-party clients to exchange the credentials (username and password) for an access token. OAuth advises to use client_credentials

Usage

Create an Endpoint implementing the \Diglin\OAuth2OroBundle\Api\Endpoints\EndpointInterface interface. Your class can looks like this:

Then in your code you can do the following (be aware, the code below should be adapted of course)

Tips

To get the list of available endpoints on your Oro Application, you can request the url https://myoroapp.com/api/doc (if you use OroCommerce, there is a difference between frontend and backend, in this case the admin url for backend API may looks like this https://myoroapp.com/admin/api/doc)

PHP Test compatibility

Run ./vendor/bin/phpcs -p src --standard=PHPCompatibility --runtime-set testVersion 8.1

TODO

License

See LICENSE.txt

Author


All versions of oauth2-oro-provider with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1|^8.1
league/oauth2-client Version ^2.4
symfony/config Version ^4.4|^5.4|^6.1
symfony/http-kernel Version ^4.4|^5.4|^6.1
symfony/dependency-injection Version ^4.4|^5.4|^6.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 diglin/oauth2-oro-provider contains the following files

Loading the files please wait ....