mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-12-23 05:29:52 +05:30
Merge branch 'master' of github.com:thephpleague/oauth2-server
This commit is contained in:
commit
92404ab2bf
@ -1,5 +1,10 @@
|
|||||||
# Changelog
|
# 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)
|
## 4.0.2 (released 2014-11-21)
|
||||||
|
|
||||||
* Improved interfaces (Issue #255)
|
* Improved interfaces (Issue #255)
|
||||||
|
@ -34,7 +34,7 @@ class AccessTokenStorage extends AbstractStorage implements AccessTokenInterface
|
|||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function getScopes(AbstractTokenEntity $token)
|
public function getScopes(AccessTokenEntity $token)
|
||||||
{
|
{
|
||||||
$result = Capsule::table('oauth_access_token_scopes')
|
$result = Capsule::table('oauth_access_token_scopes')
|
||||||
->select(['oauth_scopes.id', 'oauth_scopes.description'])
|
->select(['oauth_scopes.id', 'oauth_scopes.description'])
|
||||||
@ -73,7 +73,7 @@ class AccessTokenStorage extends AbstractStorage implements AccessTokenInterface
|
|||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function associateScope(AbstractTokenEntity $token, ScopeEntity $scope)
|
public function associateScope(AccessTokenEntity $token, ScopeEntity $scope)
|
||||||
{
|
{
|
||||||
Capsule::table('oauth_access_token_scopes')
|
Capsule::table('oauth_access_token_scopes')
|
||||||
->insert([
|
->insert([
|
||||||
@ -85,7 +85,7 @@ class AccessTokenStorage extends AbstractStorage implements AccessTokenInterface
|
|||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function delete(AbstractTokenEntity $token)
|
public function delete(AccessTokenEntity $token)
|
||||||
{
|
{
|
||||||
Capsule::table('oauth_access_token_scopes')
|
Capsule::table('oauth_access_token_scopes')
|
||||||
->where('access_token', $token->getId())
|
->where('access_token', $token->getId())
|
||||||
|
@ -24,6 +24,7 @@ class AuthCodeStorage extends AbstractStorage implements AuthCodeInterface
|
|||||||
$token = new AuthCodeEntity($this->server);
|
$token = new AuthCodeEntity($this->server);
|
||||||
$token->setId($result[0]['auth_code']);
|
$token->setId($result[0]['auth_code']);
|
||||||
$token->setRedirectUri($result[0]['client_redirect_uri']);
|
$token->setRedirectUri($result[0]['client_redirect_uri']);
|
||||||
|
$token->setExpireTime($result[0]['expire_time']);
|
||||||
|
|
||||||
return $token;
|
return $token;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user