Merge branch 'master' of github.com:thephpleague/oauth2-server

This commit is contained in:
Alex Bilbie 2014-12-03 22:56:05 +00:00
commit 92404ab2bf
3 changed files with 9 additions and 3 deletions

View File

@ -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)

View File

@ -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())

View File

@ -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;
}