mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-11-15 09:47:46 +05:30
Little fixes
This commit is contained in:
parent
ca3b7d51df
commit
69571bc8ef
@ -14,8 +14,7 @@ namespace League\OAuth2\Server\Entities;
|
|||||||
use League\OAuth2\Server\Storage\SessionStorageInterface;
|
use League\OAuth2\Server\Storage\SessionStorageInterface;
|
||||||
use League\OAuth2\Server\Util\SecureKey;
|
use League\OAuth2\Server\Util\SecureKey;
|
||||||
use League\OAuth2\Server\Exception\ServerException;
|
use League\OAuth2\Server\Exception\ServerException;
|
||||||
use League\OAuth2\Server\Authorization;
|
use League\OAuth2\Server\AbstractServer;
|
||||||
use League\OAuth2\Server\Resource;
|
|
||||||
use Symfony\Component\HttpFoundation\ParameterBag;
|
use Symfony\Component\HttpFoundation\ParameterBag;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -55,15 +54,11 @@ abstract class AbstractToken
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* __construct
|
* __construct
|
||||||
* @param \League\OAuth2\Server\Authorization|\League\OAuth2\Server\Resource $server
|
* @param \League\OAuth2\Server\AbstractServer $server
|
||||||
* @return self
|
* @return self
|
||||||
*/
|
*/
|
||||||
public function __construct($server)
|
public function __construct(AbstractServer $server)
|
||||||
{
|
{
|
||||||
if (! $server instanceof Authorization && ! $server instanceof Resource) {
|
|
||||||
throw new ServerException('No instance of Authorization or Resource server injected');
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->server = $server;
|
$this->server = $server;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
@ -12,8 +12,7 @@
|
|||||||
namespace League\OAuth2\Server\Entities;
|
namespace League\OAuth2\Server\Entities;
|
||||||
|
|
||||||
use League\OAuth2\Server\Exception\ServerException;
|
use League\OAuth2\Server\Exception\ServerException;
|
||||||
use League\OAuth2\Server\Authorization;
|
use League\OAuth2\Server\AbstractServer;
|
||||||
use League\OAuth2\Server\Resource;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Client entity class
|
* Client entity class
|
||||||
@ -52,14 +51,13 @@ class Client
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* __construct
|
* __construct
|
||||||
* @param \League\OAuth2\Server\Authorization|\League\OAuth2\Server\Resource $server
|
* @param \League\OAuth2\Server\AbstractServer $server
|
||||||
* @return self
|
* @return self
|
||||||
*/
|
*/
|
||||||
public function __construct($server)
|
public function __construct(AbstractServer $server)
|
||||||
{
|
{
|
||||||
if (! $server instanceof Authorization && ! $server instanceof Resource) {
|
$this->server = $server;
|
||||||
throw new ServerException('No instance of Authorization or Resource server injected');
|
return $this;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -12,8 +12,7 @@
|
|||||||
namespace League\OAuth2\Server\Entities;
|
namespace League\OAuth2\Server\Entities;
|
||||||
|
|
||||||
use League\OAuth2\Server\Exception\ServerException;
|
use League\OAuth2\Server\Exception\ServerException;
|
||||||
use League\OAuth2\Server\Authorization;
|
use League\OAuth2\Server\AbstractServer;
|
||||||
use League\OAuth2\Server\Resource;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Scope entity class
|
* Scope entity class
|
||||||
@ -40,14 +39,12 @@ class Scope
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* __construct
|
* __construct
|
||||||
* @param \League\OAuth2\Server\Authorization|\League\OAuth2\Server\Resource $server
|
* @param \League\OAuth2\Server\AbstractServer $server
|
||||||
* @return self
|
* @return self
|
||||||
*/
|
*/
|
||||||
public function __construct($server)
|
public function __construct(AbstractServer $server)
|
||||||
{
|
{
|
||||||
if (! $server instanceof Authorization && ! $server instanceof Resource) {
|
$this->server = $server;
|
||||||
throw new ServerException('No instance of Authorization or Resource server injected');
|
|
||||||
}
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,8 +14,7 @@ namespace League\OAuth2\Server\Entities;
|
|||||||
use League\OAuth2\Server\Exception\OAuth2Exception;
|
use League\OAuth2\Server\Exception\OAuth2Exception;
|
||||||
use League\OAuth2\Server\Storage\SessionInterface;
|
use League\OAuth2\Server\Storage\SessionInterface;
|
||||||
use League\OAuth2\Server\Exception\ServerException;
|
use League\OAuth2\Server\Exception\ServerException;
|
||||||
use League\OAuth2\Server\Authorization;
|
use League\OAuth2\Server\AbstractServer;
|
||||||
use League\OAuth2\Server\Resource;
|
|
||||||
use Symfony\Component\HttpFoundation\ParameterBag;
|
use Symfony\Component\HttpFoundation\ParameterBag;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -79,15 +78,11 @@ class Session
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* __construct
|
* __construct
|
||||||
* @param \League\OAuth2\Server\Authorization|\League\OAuth2\Server\Resource $server
|
* @param \League\OAuth2\Server\AbstractServer $server
|
||||||
* @return self
|
* @return self
|
||||||
*/
|
*/
|
||||||
public function __construct($server)
|
public function __construct(AbstractServer $server)
|
||||||
{
|
{
|
||||||
if (! $server instanceof Authorization && ! $server instanceof Resource) {
|
|
||||||
throw new ServerException('No instance of Authorization or Resource server injected');
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->server = $server;
|
$this->server = $server;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user