mahfuz05 / oauth2-client by mahfuz

66
0
1
Package Data
Maintainer Username: mahfuz
Maintainer Contact: mahfuzcse05@gmail.com (Mahfuzur Rahman)
Package Create Date: 2015-06-17
Package Last Update: 2015-06-19
Home Page:
Language: PHP
License: Unknown
Last Refreshed: 2024-11-29 15:13:02
Package Statistics
Total Downloads: 66
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 0
Total Watchers: 1
Total Forks: 1
Total Open Issues: 0

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');
            }