add AbstractProvider::prepareAccessTokenResult for additional token response prep

oauth1test
Woody Gilk 2015-02-23 12:23:37 -06:00
parent e18c99c999
commit 4d2e8d5669
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".
*