softonic / oauth2-provider
Softonic OAuth2 provider
Installs: 51 732
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 9
Forks: 1
Open Issues: 0
Requires
- php: >=8.0
- league/oauth2-client: ^2.2
- psr/http-message: ^1.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.6
- mockery/mockery: ^1.0
- phpunit/phpunit: ^9.0
- rector/rector: ^0.11.20
- squizlabs/php_codesniffer: ^3
This package is auto-updated.
Last update: 2024-11-17 15:06:12 UTC
README
This package provides Softonic OAuth 2.0 support for the PHP League's OAuth 2.0 Client.
Installation
You can require the last version of the package using composer
composer require softonic/oauth2-provider
Configuration
<?php $options = [ 'clientId' => 'myClient', 'clientSecret' => 'mySecret' ]; $client = new Softonic\OAuth2\Client\Provider\Softonic($options); $token = $client->getAccessToken('client_credentials', ['scope' => 'myscope']);
Testing
softonic/oauth2-provider
has a PHPUnit test suite, and a coding style compliance test suite using PHP CS Fixer.
To run the tests, run the following command from the project folder.
$ make tests
To open a terminal in the dev environment:
$ make debug
License
The Apache 2.0 license. Please see LICENSE for more information.