Merge pull request #226 from shadowhand/overload-access-token-response

Add additional method for modifying token response
oauth1test
Ben Ramsey 2015-02-24 10:34:43 -06:00
commit 021023f642
1 changed files with 14 additions and 1 deletions

View File

@ -215,11 +215,24 @@ abstract class AbstractProvider implements ProviderInterface
// @codeCoverageIgnoreEnd
}
$this->setResultUid($result);
$result = $this->prepareAccessTokenResult($result);
return $grant->handleResponse($result);
}
/**
* Prepare the access token response for the grant. Custom mapping of
* expirations, etc should be done here.
*
* @param array $result
* @return array
*/
protected function prepareAccessTokenResult(array $result)
{
$this->setResultUid($result);
return $result;
}
/**
* Sets any result keys we've received matching our provider-defined uidKey to the key "uid".
*