kobas/oauth2-kobas

Kobas OAuth 2.0 Client Provider for The PHP League OAuth2-Client

1.0 2018-10-10 00:00 UTC

This package is auto-updated.

Last update: 2024-11-07 03:23:28 UTC


README

Latest Version Software License Build Status Coverage Status Quality Score Total Downloads

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.