mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-11-01 16:33:07 +05:30
Use namespace, use PSR, get rid of Pyro settings
This commit is contained in:
parent
9dfa485bcb
commit
c993a0cdc0
@ -2,48 +2,23 @@
|
|||||||
|
|
||||||
namespace Oauth2\Client\Provider;
|
namespace Oauth2\Client\Provider;
|
||||||
|
|
||||||
class Blooie extends Oauth2\Client\Provider
|
class Blooie extends Oauth2\Client\IDP
|
||||||
{
|
{
|
||||||
public $scope = array('user.profile', 'user.picture');
|
public $scope = array('user.profile', 'user.picture');
|
||||||
|
|
||||||
public $method = 'POST';
|
public $method = 'POST';
|
||||||
|
|
||||||
public function url_authorize()
|
public function urlAuthorize()
|
||||||
{
|
{
|
||||||
switch (ENVIRONMENT)
|
return 'https://bloo.ie/oauth';
|
||||||
{
|
|
||||||
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?!');
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function url_access_token()
|
public function urlAccessToken()
|
||||||
{
|
{
|
||||||
switch (ENVIRONMENT)
|
return 'https://bloo.ie/oauth/access_token';
|
||||||
{
|
}
|
||||||
case PYRO_DEVELOPMENT:
|
|
||||||
return 'http://local.bloo.ie/oauth/access_token';
|
|
||||||
|
|
||||||
case PYRO_STAGING:
|
public function getUserInfo(OAuth2\Token\Access $token)
|
||||||
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)
|
|
||||||
{
|
{
|
||||||
$url = 'https://graph.facebook.com/me?'.http_build_query(array(
|
$url = 'https://graph.facebook.com/me?'.http_build_query(array(
|
||||||
'access_token' => $token->access_token,
|
'access_token' => $token->access_token,
|
||||||
|
Loading…
Reference in New Issue
Block a user