kobas / oauth2-kobas
Kobas OAuth 2.0 Client Provider for The PHP League OAuth2-Client
Installs: 13 664
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 0
Open Issues: 0
Requires
- league/oauth2-client: ^2.0
Requires (Dev)
- ext-xdebug: *
- mockery/mockery: ~1.2.0
- phpunit/phpunit: ~5.7.27
- squizlabs/php_codesniffer: ~3.3.2
This package is auto-updated.
Last update: 2024-11-07 03:23:28 UTC
README
This package provides Kobas OAuth 2.0 support for the PHP League's OAuth 2.0 Client.
If you are doing an integration for Kobas it's more likely you want our API Client which uses this library.
Installation
To install, use composer:
composer require kobas/oauth2-kobas
Usage
Usage is the same as The League's OAuth client, using \Kobas\OAuth2\Client\Provider\Kobas
as the provider.
Authorization Code Flow
$provider = new Kobas\OAuth2\Client\Provider\Kobas([ 'clientId' => '{kobas-client-id}', 'clientSecret' => '{kobas-client-secret}', 'companyId' => '{kobas-company-id}', ]); $accessToken = $provider->getAccessToken('client_credentials', ['scope' => 'integration']);
Testing
$ ./vendor/bin/phpunit
The MIT License (MIT). Please see License File for more information.