mahfuz05/laravel-oauth2

66
Install
composer require mahfuz05/laravel-oauth2
PHP:>=5.4.0
Last Updated:Jun 19, 2015
Links: GitHub  ·  Packagist
Maintainer: mahfuz

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/framework

The Laravel Framework.

589,172,971 34,950
laravel/tinker

Powerful REPL for the Laravel framework.

502,645,077 7,441
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