diff --git a/src/Provider/AbstractProvider.php b/src/Provider/AbstractProvider.php index 96799ea..4c12f06 100644 --- a/src/Provider/AbstractProvider.php +++ b/src/Provider/AbstractProvider.php @@ -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". *