2017 © Pedro Peláez
 

library social_auth

image

hindy/social_auth

  • Friday, August 5, 2016
  • by hashstudio
  • Repository
  • 1 Watchers
  • 1 Stars
  • 26 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

OAuth 1.0 / 2.0 component

Authorize users with your application using multiple OAuth 1/2 providers., (*1)

Based on oauth1 and oauth2., (*2)

Supported Providers

  • Dropbox
  • Flickr
  • LinkedIn
  • Tumblr
  • Twitter
  • UbuntuOne
  • Vimeo
  • Appnet
  • Facebook
  • Foursquare
  • GitHub
  • Google
  • Instagram
  • Mailchimp
  • Mailru
  • PayPal
  • Soundcloud
  • Vkontakte
  • Windows Live
  • Yandex
  • YouTube
  • Odnoklassniki

Usage Example

In this example we will authenticate the user using Twitter., (*3)

qwe

Calling OAuth 1 / 2 APIs using Guzzle

You can also use this package to make calls to your respective APIs using Guzzle., (*4)

$client = new Mindy\SocialAuth\OAuthClient('http://api.twitter.com/1.1');
$client->setUserTokens($provider->getUserTokens());
echo $client->get('statuses/mentions_timeline.json')->send();

This example should show your Twitter mentions from the API along with the headers, (*5)

$client = new \OAuth2\Client('https://graph.facebook.com');
$client->setUserTokens($oauth->getUserTokens());

echo $client->get('me')->send();

This example should show your Facebook profile from the API along with the headers, (*6)

TODO

  • OpenID

The Versions