mahfuz05/laravel-oauth2
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
<code><b>'providers' => 'Mahfuz05\LaravelOauth2\LaravelOauth2ServiceProvider'</b></code>
<br>
<code><b>'aliases' => 'LaravelOauth2' => 'Mahfuz05\LaravelOauth2\Facades\LaravelOauth2'</b></code>
if (!isset($_GET['code']))
{
$auth_url = LaravelOauth2::getAuthenticationUrl($this->url, $this->redirectUri);
header('Location: ' . $auth_url);
die('Redirect');
}
else
{
$params = array('code' => $_GET['code'], 'redirect_uri' => $this->redirectUri);
$response = LaravelOauth2::getAccessToken($this->token_url, 'authorization_code', $params);
//get Access Token and store it
LaravelOauth2::setAccessToken($response['result']['access_token']);
$token = $response['result']['access_token'];
//get all customers
$response = LaravelOauth2::fetch('https://api.debitoor.com/api/v1.0/customers');
}
Related Packages
doctrine/dbal
Powerful PHP database abstraction layer (DBAL) with many features for database s...
641,106,524
9,700
laravel/serializable-closure
Laravel Serializable Closure provides an easy and secure way to serialize closur...
418,291,778
609
nunomaduro/collision
Cli error handling for console/command-line PHP applications.
394,964,158
4,660