diff --git a/src/Oauth2/Client/Provider/Blooie.php b/src/Oauth2/Client/Provider/Blooie.php index 0d151fca..8078690e 100755 --- a/src/Oauth2/Client/Provider/Blooie.php +++ b/src/Oauth2/Client/Provider/Blooie.php @@ -1,7 +1,5 @@ $token->access_token, @@ -26,7 +24,6 @@ class Blooie extends Oauth2\Client\IDP $user = json_decode(file_get_contents($url)); - // Create a response from the request return array( 'uid' => $user->id, 'nickname' => $user->username, diff --git a/src/Oauth2/Client/Provider/Facebook.php b/src/Oauth2/Client/Provider/Facebook.php index 39decb31..53aba543 100755 --- a/src/Oauth2/Client/Provider/Facebook.php +++ b/src/Oauth2/Client/Provider/Facebook.php @@ -9,23 +9,21 @@ * @license http://philsturgeon.co.uk/code/dbad-license */ -namespace Oauth2\Client\Provider; - -class Facebook extends Oauth2\Client\Provider +class Facebook extends Oauth2\Client\IDP { protected $scope = array('offline_access', 'email', 'read_stream'); - public function url_authorize() + public function urlAuthorize() { return 'https://www.facebook.com/dialog/oauth'; } - public function url_access_token() + public function urlAccessToken() { return 'https://graph.facebook.com/oauth/access_token'; } - public function get_user_info(OAuth2_Token_Access $token) + public function getUserInfo(Oauth2\Token\Access $token) { $url = 'https://graph.facebook.com/me?'.http_build_query(array( 'access_token' => $token->access_token, @@ -33,7 +31,6 @@ class Facebook extends Oauth2\Client\Provider $user = json_decode(file_get_contents($url)); - // Create a response from the request return array( 'uid' => $user->id, 'nickname' => isset($user->username) ? $user->username : null, diff --git a/src/Oauth2/Client/Provider/Foursquare.php b/src/Oauth2/Client/Provider/Foursquare.php index 275f055b..ebf81cb1 100755 --- a/src/Oauth2/Client/Provider/Foursquare.php +++ b/src/Oauth2/Client/Provider/Foursquare.php @@ -9,21 +9,21 @@ * @license http://philsturgeon.co.uk/code/dbad-license */ -class OAuth2_Provider_Foursquare extends OAuth2_Provider +class Foursquare extends Oauth2\Client\IDP { public $method = 'POST'; - public function url_authorize() + public function urlAuthorize() { return 'https://foursquare.com/oauth2/authenticate'; } - public function url_access_token() + public function urlAccessToken() { return 'https://foursquare.com/oauth2/access_token'; } - public function get_user_info(OAuth2_Token_Access $token) + public function getUserInfo(Oauth2\Token\Access $token) { $url = 'https://api.foursquare.com/v2/users/self?'.http_build_query(array( 'oauth_token' => $token->access_token, @@ -36,7 +36,6 @@ class OAuth2_Provider_Foursquare extends OAuth2_Provider // Create a response from the request return array( 'uid' => $user->id, - //'nickname' => $user->login, 'name' => sprintf('%s %s', $user->firstName, $user->lastName), 'email' => $user->contact->email, 'image' => $user->photo, diff --git a/src/Oauth2/Client/Provider/Github.php b/src/Oauth2/Client/Provider/Github.php index cb406167..acfd59ff 100755 --- a/src/Oauth2/Client/Provider/Github.php +++ b/src/Oauth2/Client/Provider/Github.php @@ -9,19 +9,19 @@ * @license http://philsturgeon.co.uk/code/dbad-license */ -class OAuth2_Provider_Github extends OAuth2_Provider +class OAuth2_Provider_Github extends Oauth2\Client\IDP { - public function url_authorize() + public function urlAuthorize() { return 'https://github.com/login/oauth/authorize'; } - public function url_access_token() + public function urlAccessToken() { return 'https://github.com/login/oauth/access_token'; } - public function get_user_info(OAuth2_Token_Access $token) + public function getUserInfo(Oauth\Token\Access $token) { $url = 'https://api.github.com/user?'.http_build_query(array( 'access_token' => $token->access_token, @@ -29,7 +29,6 @@ class OAuth2_Provider_Github extends OAuth2_Provider $user = json_decode(file_get_contents($url)); - // Create a response from the request return array( 'uid' => $user->id, 'nickname' => $user->login,