From c993a0cdc009196d7be5aceed99399d12dc10eef Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Tue, 4 Sep 2012 14:50:20 +0100 Subject: [PATCH] Use namespace, use PSR, get rid of Pyro settings --- src/Oauth2/Client/Provider/Blooie.php | 39 +++++---------------------- 1 file changed, 7 insertions(+), 32 deletions(-) diff --git a/src/Oauth2/Client/Provider/Blooie.php b/src/Oauth2/Client/Provider/Blooie.php index 7c80abbc..0d151fca 100755 --- a/src/Oauth2/Client/Provider/Blooie.php +++ b/src/Oauth2/Client/Provider/Blooie.php @@ -2,48 +2,23 @@ namespace Oauth2\Client\Provider; -class Blooie extends Oauth2\Client\Provider +class Blooie extends Oauth2\Client\IDP { public $scope = array('user.profile', 'user.picture'); public $method = 'POST'; - public function url_authorize() + public function urlAuthorize() { - switch (ENVIRONMENT) - { - case PYRO_DEVELOPMENT: - return 'http://local.bloo.ie/oauth'; - - case PYRO_STAGING: - return 'http://blooie-staging.pagodabox.com/oauth'; - - case PYRO_PRODUCTIION: - return 'https://bloo.ie/oauth'; - - default: - exit('What the crap?!'); - } - + return 'https://bloo.ie/oauth'; } - public function url_access_token() + public function urlAccessToken() { - switch (ENVIRONMENT) - { - case PYRO_DEVELOPMENT: - return 'http://local.bloo.ie/oauth/access_token'; + return 'https://bloo.ie/oauth/access_token'; + } - case PYRO_STAGING: - return 'http://blooie-staging.pagodabox.com/oauth/access_token'; - - case PYRO_PRODUCTIION: - return 'https://bloo.ie/oauth/access_token'; - - default: - } - - 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,