mirror of
https://github.com/elyby/oauth2-server.git
synced 2025-01-03 10:41:51 +05:30
PSR fixes
This commit is contained in:
parent
df85c98e53
commit
38c50c00b0
@ -25,18 +25,15 @@ class OAuthdb implements Database
|
||||
|
||||
public function validateClient($clientId, $clientSecret = null, $redirectUri = null)
|
||||
{
|
||||
if ($clientId !== $this->clients[0]['client_id'])
|
||||
{
|
||||
if ($clientId !== $this->clients[0]['client_id']) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($clientSecret !== null && $clientSecret !== $this->clients[0]['client_secret'])
|
||||
{
|
||||
if ($clientSecret !== null && $clientSecret !== $this->clients[0]['client_secret']) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($redirectUri !== null && $redirectUri !== $this->clients[0]['redirect_uri'])
|
||||
{
|
||||
if ($redirectUri !== null && $redirectUri !== $this->clients[0]['redirect_uri']) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -78,8 +75,7 @@ class OAuthdb implements Database
|
||||
public function deleteSession($clientId, $type, $typeId)
|
||||
{
|
||||
$key = $clientId . ':' . $type . ':' . $typeId;
|
||||
if (isset($this->sessions_client_type_id[$key]))
|
||||
{
|
||||
if (isset($this->sessions_client_type_id[$key])) {
|
||||
unset($this->sessions[$this->sessions_client_type_id[$key]]);
|
||||
}
|
||||
return true;
|
||||
@ -89,8 +85,7 @@ class OAuthdb implements Database
|
||||
{
|
||||
$key = $clientId . ':' . $redirectUri . ':' . $authCode;
|
||||
|
||||
if (isset($this->sessions_code[$key]))
|
||||
{
|
||||
if (isset($this->sessions_code[$key])) {
|
||||
return $this->sessions[$this->sessions_code[$key]];
|
||||
}
|
||||
|
||||
@ -112,18 +107,14 @@ class OAuthdb implements Database
|
||||
die('not implemented removeAuthCode');
|
||||
}
|
||||
|
||||
public function setAccessToken(
|
||||
$sessionId,
|
||||
$accessToken
|
||||
)
|
||||
public function setAccessToken($sessionId, $accessToken)
|
||||
{
|
||||
die('not implemented setAccessToken');
|
||||
}
|
||||
|
||||
public function addSessionScope($sessionId, $scope)
|
||||
{
|
||||
if ( ! isset($this->session_scopes[$sessionId]))
|
||||
{
|
||||
if ( ! isset($this->session_scopes[$sessionId])) {
|
||||
$this->session_scopes[$sessionId] = array();
|
||||
}
|
||||
|
||||
@ -134,8 +125,7 @@ class OAuthdb implements Database
|
||||
|
||||
public function getScope($scope)
|
||||
{
|
||||
if ( ! isset($this->scopes[$scope]))
|
||||
{
|
||||
if ( ! isset($this->scopes[$scope])) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user