Merge pull request #226 from shadowhand/overload-access-token-response
Add additional method for modifying token responseoauth1test
commit
021023f642
|
@ -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".
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue