mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-11-01 16:33:07 +05:30
Updated create a new session
This commit is contained in:
parent
4ef8030a93
commit
a4715bfc3b
@ -157,8 +157,6 @@ class AuthCode implements GrantTypeInterface {
|
||||
// Remove any old sessions the user might have
|
||||
$this->authServer->getStorage('session')->deleteSession($authParams['client_id'], $type, $typeId);
|
||||
|
||||
// Create a new session
|
||||
$sessionId = $this->authServer->getStorage('session')->createSession($authParams['client_id'], $authParams['redirect_uri'], $type, $typeId, $authCode);
|
||||
|
||||
// Associate scopes with the new session
|
||||
foreach ($authParams['scopes'] as $scope)
|
||||
@ -166,6 +164,16 @@ class AuthCode implements GrantTypeInterface {
|
||||
$this->authServer->getStorage('session')->associateScope($sessionId, $scope['id']);
|
||||
}
|
||||
|
||||
// Create a new session
|
||||
$sessionId = $this->authServer->getStorage('session')->createSession(array(
|
||||
'client_id' => $authParams['client_id'],
|
||||
'owner_type' => $type,
|
||||
'owner_id' => $typeId,
|
||||
'redirect_uri' =>$authParams['redirect_uri'],
|
||||
'auth_code' => $authCode,
|
||||
'scope_ids' => implode(',', $scopeIds)
|
||||
));
|
||||
|
||||
return $authCode;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user