Don't delete old sessions when issuing new access tokens using the Password or Client Credential grants. Fixes #32

This commit is contained in:
Alex Bilbie 2013-05-09 10:43:44 -07:00
parent d677b765b2
commit 76f2f6a5e1
2 changed files with 0 additions and 6 deletions

View File

@ -149,9 +149,6 @@ class ClientCredentials implements GrantTypeInterface {
$accessTokenExpiresIn = ($this->accessTokenTTL !== null) ? $this->accessTokenTTL : $this->authServer->getAccessTokenTTL(); $accessTokenExpiresIn = ($this->accessTokenTTL !== null) ? $this->accessTokenTTL : $this->authServer->getAccessTokenTTL();
$accessTokenExpires = time() + $accessTokenExpiresIn; $accessTokenExpires = time() + $accessTokenExpiresIn;
// Delete any existing sessions just to be sure
$this->authServer->getStorage('session')->deleteSession($authParams['client_id'], 'client', $authParams['client_id']);
// Create a new session // Create a new session
$sessionId = $this->authServer->getStorage('session')->createSession($authParams['client_id'], 'client', $authParams['client_id']); $sessionId = $this->authServer->getStorage('session')->createSession($authParams['client_id'], 'client', $authParams['client_id']);

View File

@ -193,9 +193,6 @@ class Password implements GrantTypeInterface {
$accessTokenExpiresIn = ($this->accessTokenTTL !== null) ? $this->accessTokenTTL : $this->authServer->getAccessTokenTTL(); $accessTokenExpiresIn = ($this->accessTokenTTL !== null) ? $this->accessTokenTTL : $this->authServer->getAccessTokenTTL();
$accessTokenExpires = time() + $accessTokenExpiresIn; $accessTokenExpires = time() + $accessTokenExpiresIn;
// Delete any existing sessions just to be sure
$this->authServer->getStorage('session')->deleteSession($authParams['client_id'], 'user', $userId);
// Create a new session // Create a new session
$sessionId = $this->authServer->getStorage('session')->createSession($authParams['client_id'], 'user', $userId); $sessionId = $this->authServer->getStorage('session')->createSession($authParams['client_id'], 'user', $userId);