mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-12-23 21:49:50 +05:30
Converted PHP 5.4 array syntax to old-skool syntax
This commit is contained in:
parent
1fcdbf45b2
commit
0b3a9dc888
@ -6,11 +6,11 @@ class Session implements SessionInterface
|
|||||||
{
|
{
|
||||||
public function createSession($clientId, $ownerType, $ownerId)
|
public function createSession($clientId, $ownerType, $ownerId)
|
||||||
{
|
{
|
||||||
return DB::table('oauth_sessions')->insertGetId([
|
return DB::table('oauth_sessions')->insertGetId(array(
|
||||||
'client_id' => $clientId,
|
'client_id' => $clientId,
|
||||||
'owner_type' => $ownerType,
|
'owner_type' => $ownerType,
|
||||||
'owner_id' => $ownerId
|
'owner_id' => $ownerId
|
||||||
]);
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function deleteSession($clientId, $ownerType, $ownerId)
|
public function deleteSession($clientId, $ownerType, $ownerId)
|
||||||
@ -24,39 +24,39 @@ class Session implements SessionInterface
|
|||||||
|
|
||||||
public function associateRedirectUri($sessionId, $redirectUri)
|
public function associateRedirectUri($sessionId, $redirectUri)
|
||||||
{
|
{
|
||||||
DB::table('oauth_session_redirects')->insert([
|
DB::table('oauth_session_redirects')->insert(array(
|
||||||
'session_id' => $sessionId,
|
'session_id' => $sessionId,
|
||||||
'redirect_uri' => $redirectUri,
|
'redirect_uri' => $redirectUri,
|
||||||
]);
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function associateAccessToken($sessionId, $accessToken, $expireTime)
|
public function associateAccessToken($sessionId, $accessToken, $expireTime)
|
||||||
{
|
{
|
||||||
return DB::table('oauth_session_access_tokens')->insertGetId([
|
return DB::table('oauth_session_access_tokens')->insertGetId(array(
|
||||||
'session_id' => $sessionId,
|
'session_id' => $sessionId,
|
||||||
'access_token' => $accessToken,
|
'access_token' => $accessToken,
|
||||||
'access_token_expires' => $expireTime,
|
'access_token_expires' => $expireTime,
|
||||||
]);
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function associateRefreshToken($accessTokenId, $refreshToken, $expireTime, $clientId)
|
public function associateRefreshToken($accessTokenId, $refreshToken, $expireTime, $clientId)
|
||||||
{
|
{
|
||||||
DB::table('oauth_session_refresh_tokens')->insert([
|
DB::table('oauth_session_refresh_tokens')->insert(array(
|
||||||
'session_access_token_id' => $accessTokenId,
|
'session_access_token_id' => $accessTokenId,
|
||||||
'refresh_token' => $refreshToken,
|
'refresh_token' => $refreshToken,
|
||||||
'refresh_token_expires' => $expireTime,
|
'refresh_token_expires' => $expireTime,
|
||||||
'client_id' => $clientId,
|
'client_id' => $clientId,
|
||||||
]);
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function associateAuthCode($sessionId, $authCode, $expireTime, $scopeIds = null)
|
public function associateAuthCode($sessionId, $authCode, $expireTime, $scopeIds = null)
|
||||||
{
|
{
|
||||||
DB::table('oauth_session_authcodes')->insert([
|
DB::table('oauth_session_authcodes')->insert(array(
|
||||||
'session_id' => $sessionId,
|
'session_id' => $sessionId,
|
||||||
'auth_code' => $authCode,
|
'auth_code' => $authCode,
|
||||||
'auth_code_expires' => $expireTime,
|
'auth_code_expires' => $expireTime,
|
||||||
'scope_ids' => $scopeIds,
|
'scope_ids' => $scopeIds,
|
||||||
]);
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function removeAuthCode($sessionId)
|
public function removeAuthCode($sessionId)
|
||||||
@ -114,10 +114,10 @@ class Session implements SessionInterface
|
|||||||
|
|
||||||
public function associateScope($accessTokenId, $scopeId)
|
public function associateScope($accessTokenId, $scopeId)
|
||||||
{
|
{
|
||||||
DB::table('oauth_session_token_scopes')->insert([
|
DB::table('oauth_session_token_scopes')->insert(array(
|
||||||
'session_access_token_id' => $accessTokenId,
|
'session_access_token_id' => $accessTokenId,
|
||||||
'scope_id' => $scopeId,
|
'scope_id' => $scopeId,
|
||||||
]);
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getScopes($accessToken)
|
public function getScopes($accessToken)
|
||||||
|
Loading…
Reference in New Issue
Block a user