PHP code example of softonic / oauth2-provider
1. Go to this page and download the library: Download softonic/oauth2-provider library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
softonic / oauth2-provider example snippets
$options = [
'clientId' => 'myClient',
'clientSecret' => 'mySecret'
];
$client = new Softonic\OAuth2\Client\Provider\Softonic($options);
$token = $client->getAccessToken('client_credentials', ['scope' => 'myscope']);