Skip to content

Commit

Permalink
add missing abstract get_user_info() method
Browse files Browse the repository at this point in the history
  • Loading branch information
mindplay-dk committed Oct 24, 2012
1 parent 5846204 commit 84c6f23
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions libraries/Provider.php
Expand Up @@ -51,8 +51,8 @@ abstract class OAuth2_Provider
*
* Any of the provider options can be set here, such as app_id or secret.
*
* @param array provider options
* @return void
* @param array $options provider options
* @throws Exception if a required option is not provided
*/
public function __construct(array $options = array())
{
Expand Down Expand Up @@ -82,7 +82,7 @@ public function __construct(array $options = array())
* // Get the provider signature
* $signature = $provider->signature;
*
* @param string variable name
* @param string $key variable name
* @return mixed
*/
public function __get($key)
Expand All @@ -108,12 +108,18 @@ abstract public function url_authorize();
*/
abstract public function url_access_token();

/**
* @param OAuth2_Token_Access $token
* @return array basic user info
*/
abstract public function get_user_info(OAuth2_Token_Access $token);

/*
* Get an authorization code from Facebook. Redirects to Facebook, which this redirects back to the app using the redirect address you've set.
*/
public function authorize($options = array())
{
$state = md5(uniqid(rand(), TRUE));
$state = md5(uniqid(rand(), true));
get_instance()->session->set_userdata('state', $state);

$params = array(
Expand Down Expand Up @@ -154,7 +160,7 @@ public function access($code, $options = array())
break;
}

$response = null;
$response = null;
$url = $this->url_access_token();

switch ($this->method)
Expand Down

0 comments on commit 84c6f23

Please sign in to comment.