diff --git a/CHANGELOG.md b/CHANGELOG.md index 5aedca34..011c1055 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 4.0.3 (released 2014-12-02) + +* Fix bad type hintings (Issue #267) +* Do not forget to set the expire time (Issue #268) + ## 4.0.2 (released 2014-11-21) * Improved interfaces (Issue #255) diff --git a/examples/relational/Storage/AccessTokenStorage.php b/examples/relational/Storage/AccessTokenStorage.php index 995c6147..c724e43f 100644 --- a/examples/relational/Storage/AccessTokenStorage.php +++ b/examples/relational/Storage/AccessTokenStorage.php @@ -34,7 +34,7 @@ class AccessTokenStorage extends AbstractStorage implements AccessTokenInterface /** * {@inheritdoc} */ - public function getScopes(AbstractTokenEntity $token) + public function getScopes(AccessTokenEntity $token) { $result = Capsule::table('oauth_access_token_scopes') ->select(['oauth_scopes.id', 'oauth_scopes.description']) @@ -73,7 +73,7 @@ class AccessTokenStorage extends AbstractStorage implements AccessTokenInterface /** * {@inheritdoc} */ - public function associateScope(AbstractTokenEntity $token, ScopeEntity $scope) + public function associateScope(AccessTokenEntity $token, ScopeEntity $scope) { Capsule::table('oauth_access_token_scopes') ->insert([ @@ -85,7 +85,7 @@ class AccessTokenStorage extends AbstractStorage implements AccessTokenInterface /** * {@inheritdoc} */ - public function delete(AbstractTokenEntity $token) + public function delete(AccessTokenEntity $token) { Capsule::table('oauth_access_token_scopes') ->where('access_token', $token->getId()) diff --git a/examples/relational/Storage/AuthCodeStorage.php b/examples/relational/Storage/AuthCodeStorage.php index c744c081..6a44a714 100644 --- a/examples/relational/Storage/AuthCodeStorage.php +++ b/examples/relational/Storage/AuthCodeStorage.php @@ -24,6 +24,7 @@ class AuthCodeStorage extends AbstractStorage implements AuthCodeInterface $token = new AuthCodeEntity($this->server); $token->setId($result[0]['auth_code']); $token->setRedirectUri($result[0]['client_redirect_uri']); + $token->setExpireTime($result[0]['expire_time']); return $token; }