mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-12-22 13:09:44 +05:30
Renamed Authorization to AuthorizationServer
This commit is contained in:
parent
e4622b1f65
commit
5254c9d225
@ -28,7 +28,7 @@ use Symfony\Component\HttpFoundation\Request;
|
||||
/**
|
||||
* OAuth 2.0 authorization server class
|
||||
*/
|
||||
class Authorization extends AbstractServer
|
||||
class AuthorizationServer extends AbstractServer
|
||||
{
|
||||
/**
|
||||
* The delimeter between scopes specified in the scope query string parameter
|
@ -11,7 +11,7 @@
|
||||
|
||||
namespace League\OAuth2\Server\Grant;
|
||||
|
||||
use League\OAuth2\Server\Authorization;
|
||||
use League\OAuth2\Server\AuthorizationServer;
|
||||
use League\OAuth2\Server\Entity\Scope;
|
||||
use League\OAuth2\Server\Exception\ClientException;
|
||||
|
||||
@ -92,10 +92,10 @@ abstract class AbstractGrant implements GrantTypeInterface
|
||||
|
||||
/**
|
||||
* Inject the authorization server into the grant
|
||||
* @param Authorization $server The authorization server instance
|
||||
* @param AuthorizationServer $server The authorization server instance
|
||||
* @return self
|
||||
*/
|
||||
public function setAuthorizationServer(Authorization $server)
|
||||
public function setAuthorizationServer(AuthorizationServer $server)
|
||||
{
|
||||
$this->server = $server;
|
||||
return $this;
|
||||
|
@ -5,7 +5,7 @@ namespace LeagueTests\Entities;
|
||||
use LeagueTests\Stubs\StubAbstractToken;
|
||||
use League\OAuth2\Server\Entity\Session;
|
||||
use League\OAuth2\Server\Entity\Scope;
|
||||
use League\OAuth2\Server\Authorization;
|
||||
use League\OAuth2\Server\AuthorizationServer as Authorization;
|
||||
use \Mockery as M;
|
||||
|
||||
class AbstractTokenTests extends \PHPUnit_Framework_TestCase
|
||||
|
@ -5,7 +5,7 @@ namespace LeagueTests\Entities;
|
||||
use League\OAuth2\Server\Entity\Scope;
|
||||
use League\OAuth2\Server\Entity\Session;
|
||||
use League\OAuth2\Server\Entity\AccessToken;
|
||||
use League\OAuth2\Server\Authorization;
|
||||
use League\OAuth2\Server\AuthorizationServer as Authorization;
|
||||
use \Mockery as M;
|
||||
|
||||
class AccessTokenTests extends \PHPUnit_Framework_TestCase
|
||||
|
@ -6,7 +6,7 @@ use League\OAuth2\Server\Entity\Scope;
|
||||
use League\OAuth2\Server\Entity\Session;
|
||||
use League\OAuth2\Server\Entity\AccessToken;
|
||||
use League\OAuth2\Server\Entity\RefreshToken;
|
||||
use League\OAuth2\Server\Authorization;
|
||||
use League\OAuth2\Server\AuthorizationServer as Authorization;
|
||||
use \Mockery as M;
|
||||
|
||||
class RefreshTokenTests extends \PHPUnit_Framework_TestCase
|
||||
|
@ -8,7 +8,7 @@ use League\OAuth2\Server\Entity\Client;
|
||||
use League\OAuth2\Server\Entity\RefreshToken;
|
||||
use League\OAuth2\Server\Entity\Session;
|
||||
use League\OAuth2\Server\Entity\Scope;
|
||||
use League\OAuth2\Server\Authorization;
|
||||
use League\OAuth2\Server\AuthorizationServer as Authorization;
|
||||
use \Mockery as M;
|
||||
|
||||
class SessionTests extends \PHPUnit_Framework_TestCase
|
||||
|
@ -4,7 +4,7 @@ namespace LeagueTests\Grant;
|
||||
|
||||
use League\OAuth2\Server\Grant;
|
||||
use League\OAuth2\Server\Entity\Scope;
|
||||
use League\OAuth2\Server\Authorization;
|
||||
use League\OAuth2\Server\AuthorizationServer;
|
||||
use League\OAuth2\Server\Grant\ClientException;
|
||||
use LeagueTests\Stubs\StubAbstractGrant;
|
||||
use Mockery as M;
|
||||
@ -13,7 +13,7 @@ class AbstractGrantTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
function testSetGet()
|
||||
{
|
||||
$server = new Authorization;
|
||||
$server = new AuthorizationServer;
|
||||
|
||||
$grant = new StubAbstractGrant;
|
||||
$grant->setIdentifier('foobar');
|
||||
@ -23,7 +23,7 @@ class AbstractGrantTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertEquals('foobar', $grant->getIdentifier());
|
||||
$this->assertEquals('foobar', $grant->getResponseType());
|
||||
$this->assertEquals(300, $grant->getAccessTokenTTL());
|
||||
$this->assertTrue($grant->getAuthorizationServer() instanceof Authorization);
|
||||
$this->assertTrue($grant->getAuthorizationServer() instanceof AuthorizationServer);
|
||||
}
|
||||
|
||||
public function testFormatScopes()
|
||||
@ -50,7 +50,7 @@ class AbstractGrantTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function testValidateScopes()
|
||||
{
|
||||
$server = new Authorization;
|
||||
$server = new AuthorizationServer;
|
||||
|
||||
$scopeStorage = M::mock('League\OAuth2\Server\Storage\ScopeInterface');
|
||||
$scopeStorage->shouldReceive('setServer');
|
||||
@ -79,7 +79,7 @@ class AbstractGrantTest extends \PHPUnit_Framework_TestCase
|
||||
$scopeStorage = M::mock('League\OAuth2\Server\Storage\ScopeInterface');
|
||||
$scopeStorage->shouldReceive('setServer');
|
||||
|
||||
$server = new Authorization;
|
||||
$server = new AuthorizationServer;
|
||||
$server->requireScopeParam(true);
|
||||
$server->setScopeStorage($scopeStorage);
|
||||
|
||||
@ -97,7 +97,7 @@ class AbstractGrantTest extends \PHPUnit_Framework_TestCase
|
||||
$scopeStorage->shouldReceive('setServer');
|
||||
$scopeStorage->shouldReceive('get')->andReturn(null);
|
||||
|
||||
$server = new Authorization;
|
||||
$server = new AuthorizationServer;
|
||||
$server->setScopeStorage($scopeStorage);
|
||||
|
||||
$grant = new StubAbstractGrant;
|
||||
@ -108,7 +108,7 @@ class AbstractGrantTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function testValidateScopesDefaultScope()
|
||||
{
|
||||
$server = new Authorization;
|
||||
$server = new AuthorizationServer;
|
||||
|
||||
$scopeStorage = M::mock('League\OAuth2\Server\Storage\ScopeInterface');
|
||||
$scopeStorage->shouldReceive('setServer');
|
||||
@ -129,7 +129,7 @@ class AbstractGrantTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function testValidateScopesDefaultScopeArray()
|
||||
{
|
||||
$server = new Authorization;
|
||||
$server = new AuthorizationServer;
|
||||
|
||||
$scopeStorage = M::mock('League\OAuth2\Server\Storage\ScopeInterface');
|
||||
$scopeStorage->shouldReceive('setServer');
|
||||
|
@ -5,7 +5,7 @@ namespace LeagueTests\Grant;
|
||||
use League\OAuth2\Server\Grant\ClientCredentials;
|
||||
use League\OAuth2\Server\Entity\Scope;
|
||||
use League\OAuth2\Server\Entity\Client;
|
||||
use League\OAuth2\Server\Authorization;
|
||||
use League\OAuth2\Server\AuthorizationServer as Authorization;
|
||||
use League\OAuth2\Server\Grant\ClientException;
|
||||
use Mockery as M;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user