mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-11-01 16:33:07 +05:30
Renamed some session methods to avoid conflicts with ORM methods
This commit is contained in:
parent
5f8ca89772
commit
3c7fe00130
@ -243,10 +243,10 @@ class AuthServer
|
||||
$authCode = SecureKey::make();
|
||||
|
||||
// Remove any old sessions the user might have
|
||||
self::getStorage('session')->delete($authParams['client_id'], $type, $typeId);
|
||||
self::getStorage('session')->deleteSession($authParams['client_id'], $type, $typeId);
|
||||
|
||||
// Create a new session
|
||||
$sessionId = self::getStorage('session')->create($authParams['client_id'], $authParams['redirect_uri'], $type, $typeId, $authCode);
|
||||
$sessionId = self::getStorage('session')->createSession($authParams['client_id'], $authParams['redirect_uri'], $type, $typeId, $authCode);
|
||||
|
||||
// Associate scopes with the new session
|
||||
foreach ($authParams['scopes'] as $scope)
|
||||
|
@ -88,7 +88,7 @@ class AuthCode implements GrantTypeInterface {
|
||||
$accessTokenExpires = time() + AuthServer::getExpiresIn();
|
||||
$accessTokenExpiresIn = AuthServer::getExpiresIn();
|
||||
|
||||
AuthServer::getStorage('session')->update(
|
||||
AuthServer::getStorage('session')->updateSession(
|
||||
$session['id'],
|
||||
null,
|
||||
$accessToken,
|
||||
|
@ -62,10 +62,10 @@ class ClientCredentials implements GrantTypeInterface {
|
||||
$accessTokenExpiresIn = AuthServer::getExpiresIn();
|
||||
|
||||
// Delete any existing sessions just to be sure
|
||||
AuthServer::getStorage('session')->delete($authParams['client_id'], 'client', $authParams['client_id']);
|
||||
AuthServer::getStorage('session')->deleteSession($authParams['client_id'], 'client', $authParams['client_id']);
|
||||
|
||||
// Create a new session
|
||||
AuthServer::getStorage('session')->create(
|
||||
AuthServer::getStorage('session')->createSession(
|
||||
$authParams['client_id'],
|
||||
null,
|
||||
'client',
|
||||
|
@ -26,7 +26,7 @@ interface SessionInterface
|
||||
* @param string $stage The stage of the session (default ="request")
|
||||
* @return int The session ID
|
||||
*/
|
||||
public function create(
|
||||
public function createSession(
|
||||
$clientId,
|
||||
$redirectUri,
|
||||
$type = 'user',
|
||||
@ -56,7 +56,7 @@ interface SessionInterface
|
||||
* @param string $stage The stage of the session (default ="request")
|
||||
* @return void
|
||||
*/
|
||||
public function update(
|
||||
public function updateSession(
|
||||
$sessionId,
|
||||
$authCode = null,
|
||||
$accessToken = null,
|
||||
@ -78,7 +78,7 @@ interface SessionInterface
|
||||
* @param string $typeId The session owner's ID
|
||||
* @return void
|
||||
*/
|
||||
public function delete(
|
||||
public function deleteSession(
|
||||
$clientId,
|
||||
$type,
|
||||
$typeId
|
||||
@ -100,7 +100,7 @@ interface SessionInterface
|
||||
* @return string|null Return the session ID as an integer if
|
||||
* found otherwise returns false
|
||||
*/
|
||||
public function exists(
|
||||
public function sessionExists(
|
||||
$type,
|
||||
$typeId,
|
||||
$clientId
|
||||
|
Loading…
Reference in New Issue
Block a user