mirror of
https://github.com/elyby/oauth2-server.git
synced 2025-05-31 14:12:07 +05:30
More CS fixer changes
This commit is contained in:
@ -11,16 +11,11 @@
|
|||||||
|
|
||||||
namespace League\OAuth2\Server\Grant;
|
namespace League\OAuth2\Server\Grant;
|
||||||
|
|
||||||
use League\OAuth2\Server\AuthorizationServer;
|
|
||||||
use League\OAuth2\Server\Entity\AccessTokenEntity;
|
use League\OAuth2\Server\Entity\AccessTokenEntity;
|
||||||
use League\OAuth2\Server\Entity\ClientEntity;
|
use League\OAuth2\Server\Entity\ClientEntity;
|
||||||
use League\OAuth2\Server\Entity\SessionEntity;
|
use League\OAuth2\Server\Entity\SessionEntity;
|
||||||
use League\OAuth2\Server\Entity\ScopeEntity;
|
|
||||||
use League\OAuth2\Server\Exception;
|
use League\OAuth2\Server\Exception;
|
||||||
use League\OAuth2\Server\Util\SecureKey;
|
use League\OAuth2\Server\Util\SecureKey;
|
||||||
use League\OAuth2\Server\Storage\SessionInterface;
|
|
||||||
use League\OAuth2\Server\Storage\ClientInterface;
|
|
||||||
use League\OAuth2\Server\Storage\ScopeInterface;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Client credentials grant class
|
* Client credentials grant class
|
||||||
|
@ -11,14 +11,6 @@
|
|||||||
|
|
||||||
namespace League\OAuth2\Server\Grant;
|
namespace League\OAuth2\Server\Grant;
|
||||||
|
|
||||||
use League\OAuth2\Server\Request;
|
|
||||||
use League\OAuth2\Server\Authorization;
|
|
||||||
use League\OAuth2\Server\Exception;
|
|
||||||
use League\OAuth2\Server\Util\SecureKey;
|
|
||||||
use League\OAuth2\Server\Storage\SessionInterface;
|
|
||||||
use League\OAuth2\Server\Storage\ClientInterface;
|
|
||||||
use League\OAuth2\Server\Storage\ScopeInterface;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Grant type interface
|
* Grant type interface
|
||||||
*/
|
*/
|
||||||
|
@ -11,17 +11,12 @@
|
|||||||
|
|
||||||
namespace League\OAuth2\Server\Grant;
|
namespace League\OAuth2\Server\Grant;
|
||||||
|
|
||||||
use League\OAuth2\Server\AuthorizationServer;
|
|
||||||
use League\OAuth2\Server\Entity\ClientEntity;
|
use League\OAuth2\Server\Entity\ClientEntity;
|
||||||
use League\OAuth2\Server\Entity\AccessTokenEntity;
|
use League\OAuth2\Server\Entity\AccessTokenEntity;
|
||||||
use League\OAuth2\Server\Entity\RefreshTokenEntity;
|
use League\OAuth2\Server\Entity\RefreshTokenEntity;
|
||||||
use League\OAuth2\Server\Entity\SessionEntity;
|
use League\OAuth2\Server\Entity\SessionEntity;
|
||||||
use League\OAuth2\Server\Entity\ScopeEntity;
|
|
||||||
use League\OAuth2\Server\Exception;
|
use League\OAuth2\Server\Exception;
|
||||||
use League\OAuth2\Server\Util\SecureKey;
|
use League\OAuth2\Server\Util\SecureKey;
|
||||||
use League\OAuth2\Server\Storage\SessionInterface;
|
|
||||||
use League\OAuth2\Server\Storage\ClientInterface;
|
|
||||||
use League\OAuth2\Server\Storage\ScopeInterface;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Password grant class
|
* Password grant class
|
||||||
|
@ -12,15 +12,10 @@
|
|||||||
namespace League\OAuth2\Server\Grant;
|
namespace League\OAuth2\Server\Grant;
|
||||||
|
|
||||||
use League\OAuth2\Server\Request;
|
use League\OAuth2\Server\Request;
|
||||||
use League\OAuth2\Server\AuthorizationServer;
|
|
||||||
use League\OAuth2\Server\Exception;
|
use League\OAuth2\Server\Exception;
|
||||||
use League\OAuth2\Server\Util\SecureKey;
|
use League\OAuth2\Server\Util\SecureKey;
|
||||||
use League\OAuth2\Server\Storage\SessionInterface;
|
|
||||||
use League\OAuth2\Server\Storage\ClientInterface;
|
|
||||||
use League\OAuth2\Server\Storage\ScopeInterface;
|
|
||||||
use League\OAuth2\Server\Entity\RefreshTokenEntity;
|
use League\OAuth2\Server\Entity\RefreshTokenEntity;
|
||||||
use League\OAuth2\Server\Entity\AccessTokenEntity;
|
use League\OAuth2\Server\Entity\AccessTokenEntity;
|
||||||
use League\OAuth2\Server\Entity\SessionEntity;
|
|
||||||
use League\OAuth2\Server\Entity\ClientEntity;
|
use League\OAuth2\Server\Entity\ClientEntity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -11,10 +11,8 @@
|
|||||||
|
|
||||||
namespace League\OAuth2\Server;
|
namespace League\OAuth2\Server;
|
||||||
|
|
||||||
use League\OAuth2\Server\Storage\StorageWrapper;
|
|
||||||
use League\OAuth2\Server\Storage\ClientInterface;
|
use League\OAuth2\Server\Storage\ClientInterface;
|
||||||
use League\OAuth2\Server\Storage\AccessTokenInterface;
|
use League\OAuth2\Server\Storage\AccessTokenInterface;
|
||||||
use League\OAuth2\Server\Storage\AuthCodeInterface;
|
|
||||||
use League\OAuth2\Server\Storage\SessionInterface;
|
use League\OAuth2\Server\Storage\SessionInterface;
|
||||||
use League\OAuth2\Server\Storage\ScopeInterface;
|
use League\OAuth2\Server\Storage\ScopeInterface;
|
||||||
use League\OAuth2\Server\Entity\AccessTokenEntity;
|
use League\OAuth2\Server\Entity\AccessTokenEntity;
|
||||||
@ -76,6 +74,7 @@ class ResourceServer extends AbstractServer
|
|||||||
{
|
{
|
||||||
$storage->setServer($this);
|
$storage->setServer($this);
|
||||||
$this->storages[$type] = $storage;
|
$this->storages[$type] = $storage;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -96,6 +95,7 @@ class ResourceServer extends AbstractServer
|
|||||||
public function setTokenKey($key)
|
public function setTokenKey($key)
|
||||||
{
|
{
|
||||||
$this->tokenKey = $key;
|
$this->tokenKey = $key;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -162,6 +162,7 @@ class ResourceServer extends AbstractServer
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -176,6 +177,7 @@ class ResourceServer extends AbstractServer
|
|||||||
|
|
||||||
// Set the access token
|
// Set the access token
|
||||||
$this->accessToken = $this->storages['access_token']->get($accessTokenString);
|
$this->accessToken = $this->storages['access_token']->get($accessTokenString);
|
||||||
|
|
||||||
return ($this->accessToken instanceof AccessTokenEntity);
|
return ($this->accessToken instanceof AccessTokenEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,7 +14,6 @@ namespace League\OAuth2\Server\Storage;
|
|||||||
use League\OAuth2\Server\Entity\AccessTokenEntity;
|
use League\OAuth2\Server\Entity\AccessTokenEntity;
|
||||||
use League\OAuth2\Server\Entity\AbstractTokenEntity;
|
use League\OAuth2\Server\Entity\AbstractTokenEntity;
|
||||||
use League\OAuth2\Server\Entity\RefreshTokenEntity;
|
use League\OAuth2\Server\Entity\RefreshTokenEntity;
|
||||||
use League\OAuth2\Server\Entity\AuthCodeEntity;
|
|
||||||
use League\OAuth2\Server\Entity\ScopeEntity;
|
use League\OAuth2\Server\Entity\ScopeEntity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -31,6 +31,7 @@ class Adapter
|
|||||||
public function setServer(AbstractServer $server)
|
public function setServer(AbstractServer $server)
|
||||||
{
|
{
|
||||||
$this->server = $server;
|
$this->server = $server;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
|
|
||||||
namespace League\OAuth2\Server\Util\KeyAlgorithm;
|
namespace League\OAuth2\Server\Util\KeyAlgorithm;
|
||||||
|
|
||||||
|
|
||||||
class DefaultAlgorithm implements KeyAlgorithmInterface
|
class DefaultAlgorithm implements KeyAlgorithmInterface
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@ -26,6 +26,7 @@ class RedirectUri
|
|||||||
public static function make($uri, $params = array(), $queryDelimeter = '?')
|
public static function make($uri, $params = array(), $queryDelimeter = '?')
|
||||||
{
|
{
|
||||||
$uri .= (strstr($uri, $queryDelimeter) === false) ? $queryDelimeter : '&';
|
$uri .= (strstr($uri, $queryDelimeter) === false) ? $queryDelimeter : '&';
|
||||||
|
|
||||||
return $uri.http_build_query($params);
|
return $uri.http_build_query($params);
|
||||||
}
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user