softonic/oauth2-provider

Softonic OAuth2 provider

1.2.0 2020-02-06 08:32 UTC

This package is auto-updated.

Last update: 2020-05-26 17:01:29 UTC


README

Latest Version Software License Build Status Coverage Status Quality Score Total Downloads Average time to resolve an issue Percentage of issues still open

This package provides Softonic OAuth 2.0 support for the PHP League's OAuth 2.0 Client.

Installation

To install, use composer:

composer require softonic/oauth2-provider

Usage

<?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.

$ docker-compose run test

To run interactively using PsySH:

$ docker-compose run interactive

License

The Apache 2.0 license. Please see LICENSE for more information.