Renamed Authorization to AuthorizationServer

This commit is contained in:
Alex Bilbie 2014-02-24 14:42:22 +00:00
parent e4622b1f65
commit 5254c9d225
8 changed files with 17 additions and 17 deletions

View File

@ -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

View File

@ -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;

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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');

View File

@ -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;