Skip to content

Commit

Permalink
Merge pull request #297 from shadowhand/hotfix/access-token-uid-is-op…
Browse files Browse the repository at this point in the history
…tional

Make the access token user id optional
  • Loading branch information
ramsey committed May 13, 2015
2 parents 9ba7b83 + 483fba5 commit 9c0f27e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Provider/AbstractProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ abstract class AbstractProvider implements ProviderInterface
/**
* @var string Key used in the access token response to identify the user.
*/
const ACCESS_TOKEN_UID = 'uid';
const ACCESS_TOKEN_UID = null;

/**
* @var string Type of response expected from the provider.
Expand Down Expand Up @@ -412,7 +412,9 @@ abstract protected function checkResponse(array $response);
*/
protected function prepareAccessTokenResult(array $result)
{
$result['uid'] = $result[static::ACCESS_TOKEN_UID];
if (static::ACCESS_TOKEN_UID) {
$result['uid'] = $result[static::ACCESS_TOKEN_UID];
}
return $result;
}

Expand Down

0 comments on commit 9c0f27e

Please sign in to comment.