2017 © Pedro Peláez
 

library oauth2-wunderlist

A Wunderlist.com provider for league/oauth2-client

image

todomove/oauth2-wunderlist

A Wunderlist.com provider for league/oauth2-client

  • Saturday, November 12, 2016
  • by ashleyhindle
  • Repository
  • 1 Watchers
  • 1 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

Wunderlist.com Provider for OAuth 2.0 Client

This package provides WunderlistOAuth 2.0 support for the PHP League's OAuth 2.0 Client., (*1)

Installation

To install, use composer:, (*2)

composer require todomove/oauth2-wunderlist

Usage

Usage is the same as The League's OAuth client, using TodoMove\OAuth2\Client\Provider\Wunderlist as the provider., (*3)

Authorization Code Flow

$provider = new TodoMove\OAuth2\Client\Provider\Wunderlist([
    'clientId'          => '{client-id}',
    'clientSecret'      => '{client-secret}',
    'redirectUri'       => 'https://example.com/callback-url'
]);

if (!isset($_GET['code'])) {

    // If we don't have an authorization code then get one
    $authUrl = $provider->getAuthorizationUrl();
    $_SESSION['oauth2state'] = $provider->state;
    header('Location: '.$authUrl);
    exit;

// Check given state against previously stored one to mitigate CSRF attack
} elseif (empty($_GET['state']) || ($_GET['state'] !== $_SESSION['oauth2state'])) {

    unset($_SESSION['oauth2state']);
    exit('Invalid state');

} else {

    // Try to get an access token (using the authorization code grant)
    $token = $provider->getAccessToken('authorization_code', [
        'code' => $_GET['code']
    ]);

    // Use this to interact with an API on the users behalf
    echo $token->getToken();
}

The Versions

12/11 2016

dev-master

9999999-dev

A Wunderlist.com provider for league/oauth2-client

  Sources   Download

MIT

The Requires

 

authorization oauth client oauth2 authorisation wunderlist

23/10 2016

0.0.5

0.0.5.0

A Wunderlist.com provider for league/oauth2-client

  Sources   Download

MIT

The Requires

 

authorization oauth client oauth2 authorisation wunderlist

23/10 2016

0.0.4

0.0.4.0

A Wunderlist.com provider for league/oauth2-client

  Sources   Download

MIT

The Requires

 

authorization oauth client oauth2 authorisation wunderlist

22/10 2016

0.0.3

0.0.3.0

A Wunderlist.com provider for league/oauth2-client

  Sources   Download

MIT

The Requires

 

authorization oauth client oauth2 authorisation wunderlist

15/10 2016

0.0.2

0.0.2.0

A Wunderlist.com provider for league/oauth2-client

  Sources   Download

MIT

The Requires

 

authorization oauth client oauth2 authorisation wunderlist

15/10 2016

0.0.1

0.0.1.0

A Wunderlist.com provider for league/oauth2-client

  Sources   Download

MIT

The Requires

 

authorization oauth client oauth2 authorisation wunderlist