[Security] Split the component into 3 sub-components Core, ACL, HTTP
This commit is contained in:
parent
c3728d21cd
commit
7826781235
@ -49,6 +49,9 @@
|
|||||||
"symfony/proxy-manager-bridge": "self.version",
|
"symfony/proxy-manager-bridge": "self.version",
|
||||||
"symfony/routing": "self.version",
|
"symfony/routing": "self.version",
|
||||||
"symfony/security": "self.version",
|
"symfony/security": "self.version",
|
||||||
|
"symfony/security-acl": "self.version",
|
||||||
|
"symfony/security-core": "self.version",
|
||||||
|
"symfony/security-http": "self.version",
|
||||||
"symfony/security-bundle": "self.version",
|
"symfony/security-bundle": "self.version",
|
||||||
"symfony/serializer": "self.version",
|
"symfony/serializer": "self.version",
|
||||||
"symfony/stopwatch": "self.version",
|
"symfony/stopwatch": "self.version",
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
<testsuite name="Symfony Test Suite">
|
<testsuite name="Symfony Test Suite">
|
||||||
<directory>./src/Symfony/Bridge/*/Tests/</directory>
|
<directory>./src/Symfony/Bridge/*/Tests/</directory>
|
||||||
<directory>./src/Symfony/Component/*/Tests/</directory>
|
<directory>./src/Symfony/Component/*/Tests/</directory>
|
||||||
|
<directory>./src/Symfony/Component/*/*/Tests/</directory>
|
||||||
<directory>./src/Symfony/Bundle/*/Tests/</directory>
|
<directory>./src/Symfony/Bundle/*/Tests/</directory>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
</testsuites>
|
</testsuites>
|
||||||
@ -37,6 +38,7 @@
|
|||||||
<exclude>
|
<exclude>
|
||||||
<directory>./src/Symfony/Bridge/*/Tests</directory>
|
<directory>./src/Symfony/Bridge/*/Tests</directory>
|
||||||
<directory>./src/Symfony/Component/*/Tests</directory>
|
<directory>./src/Symfony/Component/*/Tests</directory>
|
||||||
|
<directory>./src/Symfony/Component/*/*/Tests</directory>
|
||||||
<directory>./src/Symfony/Bundle/*/Tests</directory>
|
<directory>./src/Symfony/Bundle/*/Tests</directory>
|
||||||
<directory>./src/Symfony/Bundle/*/Resources</directory>
|
<directory>./src/Symfony/Bundle/*/Resources</directory>
|
||||||
<directory>./src/Symfony/Component/*/Resources</directory>
|
<directory>./src/Symfony/Component/*/Resources</directory>
|
||||||
|
3
src/Symfony/Component/Security/Acl/.gitignore
vendored
Normal file
3
src/Symfony/Component/Security/Acl/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
vendor/
|
||||||
|
composer.lock
|
||||||
|
phpunit.xml
|
19
src/Symfony/Component/Security/Acl/LICENSE
Normal file
19
src/Symfony/Component/Security/Acl/LICENSE
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
Copyright (c) 2004-2013 Fabien Potencier
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is furnished
|
||||||
|
to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
23
src/Symfony/Component/Security/Acl/README.md
Normal file
23
src/Symfony/Component/Security/Acl/README.md
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
Security Component - ACL (Access Control List)
|
||||||
|
==============================================
|
||||||
|
|
||||||
|
Security provides an infrastructure for sophisticated authorization systems,
|
||||||
|
which makes it possible to easily separate the actual authorization logic from
|
||||||
|
so called user providers that hold the users credentials. It is inspired by
|
||||||
|
the Java Spring framework.
|
||||||
|
|
||||||
|
Resources
|
||||||
|
---------
|
||||||
|
|
||||||
|
Documentation:
|
||||||
|
|
||||||
|
http://symfony.com/doc/2.4/book/security.html
|
||||||
|
|
||||||
|
Resources
|
||||||
|
---------
|
||||||
|
|
||||||
|
You can run the unit tests with the following command:
|
||||||
|
|
||||||
|
$ cd path/to/Symfony/Component/Security/Acl/
|
||||||
|
$ composer.phar install --dev
|
||||||
|
$ phpunit
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Acl\Dbal;
|
namespace Symfony\Component\Security\Acl\Tests\Dbal;
|
||||||
|
|
||||||
use Symfony\Component\Security\Acl\Dbal\AclProvider;
|
use Symfony\Component\Security\Acl\Dbal\AclProvider;
|
||||||
use Symfony\Component\Security\Acl\Domain\PermissionGrantingStrategy;
|
use Symfony\Component\Security\Acl\Domain\PermissionGrantingStrategy;
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Acl\Dbal;
|
namespace Symfony\Component\Security\Acl\Tests\Dbal;
|
||||||
|
|
||||||
use Symfony\Component\Security\Acl\Dbal\AclProvider;
|
use Symfony\Component\Security\Acl\Dbal\AclProvider;
|
||||||
use Symfony\Component\Security\Acl\Domain\PermissionGrantingStrategy;
|
use Symfony\Component\Security\Acl\Domain\PermissionGrantingStrategy;
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Acl\Dbal;
|
namespace Symfony\Component\Security\Acl\Tests\Dbal;
|
||||||
|
|
||||||
use Symfony\Component\Security\Acl\Domain\RoleSecurityIdentity;
|
use Symfony\Component\Security\Acl\Domain\RoleSecurityIdentity;
|
||||||
use Symfony\Component\Security\Acl\Model\FieldEntryInterface;
|
use Symfony\Component\Security\Acl\Model\FieldEntryInterface;
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Acl\Domain;
|
namespace Symfony\Component\Security\Acl\Tests\Domain;
|
||||||
|
|
||||||
use Symfony\Component\Security\Acl\Domain\UserSecurityIdentity;
|
use Symfony\Component\Security\Acl\Domain\UserSecurityIdentity;
|
||||||
|
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Acl\Domain;
|
namespace Symfony\Component\Security\Acl\Tests\Domain;
|
||||||
|
|
||||||
class AuditLoggerTest extends \PHPUnit_Framework_TestCase
|
class AuditLoggerTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Acl\Domain;
|
namespace Symfony\Component\Security\Acl\Tests\Domain;
|
||||||
|
|
||||||
use Symfony\Component\Security\Acl\Domain\UserSecurityIdentity;
|
use Symfony\Component\Security\Acl\Domain\UserSecurityIdentity;
|
||||||
use Symfony\Component\Security\Acl\Domain\ObjectIdentity;
|
use Symfony\Component\Security\Acl\Domain\ObjectIdentity;
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Acl\Domain;
|
namespace Symfony\Component\Security\Acl\Tests\Domain;
|
||||||
|
|
||||||
use Symfony\Component\Security\Acl\Domain\FieldEntry;
|
use Symfony\Component\Security\Acl\Domain\FieldEntry;
|
||||||
|
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Acl\Domain;
|
namespace Symfony\Component\Security\Acl\Tests\Domain;
|
||||||
|
|
||||||
use Symfony\Component\Security\Acl\Domain\ObjectIdentityRetrievalStrategy;
|
use Symfony\Component\Security\Acl\Domain\ObjectIdentityRetrievalStrategy;
|
||||||
|
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Acl\Domain
|
namespace Symfony\Component\Security\Acl\Tests\Domain
|
||||||
{
|
{
|
||||||
use Symfony\Component\Security\Acl\Domain\ObjectIdentity;
|
use Symfony\Component\Security\Acl\Domain\ObjectIdentity;
|
||||||
|
|
||||||
@ -26,10 +26,10 @@ namespace Symfony\Component\Security\Tests\Acl\Domain
|
|||||||
// Test that constructor never changes passed type, even with proxies
|
// Test that constructor never changes passed type, even with proxies
|
||||||
public function testConstructorWithProxy()
|
public function testConstructorWithProxy()
|
||||||
{
|
{
|
||||||
$id = new ObjectIdentity('fooid', 'Acme\DemoBundle\Proxy\__CG__\Symfony\Component\Security\Tests\Acl\Domain\TestDomainObject');
|
$id = new ObjectIdentity('fooid', 'Acme\DemoBundle\Proxy\__CG__\Symfony\Component\Security\Acl\Tests\Domain\TestDomainObject');
|
||||||
|
|
||||||
$this->assertEquals('fooid', $id->getIdentifier());
|
$this->assertEquals('fooid', $id->getIdentifier());
|
||||||
$this->assertEquals('Acme\DemoBundle\Proxy\__CG__\Symfony\Component\Security\Tests\Acl\Domain\TestDomainObject', $id->getType());
|
$this->assertEquals('Acme\DemoBundle\Proxy\__CG__\Symfony\Component\Security\Acl\Tests\Domain\TestDomainObject', $id->getType());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testFromDomainObjectPrefersInterfaceOverGetId()
|
public function testFromDomainObjectPrefersInterfaceOverGetId()
|
||||||
@ -54,14 +54,14 @@ namespace Symfony\Component\Security\Tests\Acl\Domain
|
|||||||
{
|
{
|
||||||
$id = ObjectIdentity::fromDomainObject(new TestDomainObject());
|
$id = ObjectIdentity::fromDomainObject(new TestDomainObject());
|
||||||
$this->assertEquals('getId()', $id->getIdentifier());
|
$this->assertEquals('getId()', $id->getIdentifier());
|
||||||
$this->assertEquals('Symfony\Component\Security\Tests\Acl\Domain\TestDomainObject', $id->getType());
|
$this->assertEquals('Symfony\Component\Security\Acl\Tests\Domain\TestDomainObject', $id->getType());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testFromDomainObjectWithProxy()
|
public function testFromDomainObjectWithProxy()
|
||||||
{
|
{
|
||||||
$id = ObjectIdentity::fromDomainObject(new \Acme\DemoBundle\Proxy\__CG__\Symfony\Component\Security\Tests\Acl\Domain\TestDomainObject());
|
$id = ObjectIdentity::fromDomainObject(new \Acme\DemoBundle\Proxy\__CG__\Symfony\Component\Security\Acl\Tests\Domain\TestDomainObject());
|
||||||
$this->assertEquals('getId()', $id->getIdentifier());
|
$this->assertEquals('getId()', $id->getIdentifier());
|
||||||
$this->assertEquals('Symfony\Component\Security\Tests\Acl\Domain\TestDomainObject', $id->getType());
|
$this->assertEquals('Symfony\Component\Security\Acl\Tests\Domain\TestDomainObject', $id->getType());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -101,9 +101,9 @@ namespace Symfony\Component\Security\Tests\Acl\Domain
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace Acme\DemoBundle\Proxy\__CG__\Symfony\Component\Security\Tests\Acl\Domain
|
namespace Acme\DemoBundle\Proxy\__CG__\Symfony\Component\Security\Acl\Tests\Domain
|
||||||
{
|
{
|
||||||
class TestDomainObject extends \Symfony\Component\Security\Tests\Acl\Domain\TestDomainObject
|
class TestDomainObject extends \Symfony\Component\Security\Acl\Tests\Domain\TestDomainObject
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Acl\Domain;
|
namespace Symfony\Component\Security\Acl\Tests\Domain;
|
||||||
|
|
||||||
use Symfony\Component\Security\Acl\Domain\ObjectIdentity;
|
use Symfony\Component\Security\Acl\Domain\ObjectIdentity;
|
||||||
use Symfony\Component\Security\Acl\Domain\RoleSecurityIdentity;
|
use Symfony\Component\Security\Acl\Domain\RoleSecurityIdentity;
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Acl\Domain;
|
namespace Symfony\Component\Security\Acl\Tests\Domain;
|
||||||
|
|
||||||
use Symfony\Component\Security\Acl\Domain\UserSecurityIdentity;
|
use Symfony\Component\Security\Acl\Domain\UserSecurityIdentity;
|
||||||
use Symfony\Component\Security\Core\Role\Role;
|
use Symfony\Component\Security\Core\Role\Role;
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Acl\Domain;
|
namespace Symfony\Component\Security\Acl\Tests\Domain;
|
||||||
|
|
||||||
use Symfony\Component\Security\Acl\Domain\RoleSecurityIdentity;
|
use Symfony\Component\Security\Acl\Domain\RoleSecurityIdentity;
|
||||||
use Symfony\Component\Security\Acl\Domain\UserSecurityIdentity;
|
use Symfony\Component\Security\Acl\Domain\UserSecurityIdentity;
|
||||||
@ -88,7 +88,7 @@ class SecurityIdentityRetrievalStrategyTest extends \PHPUnit_Framework_TestCase
|
|||||||
new RoleSecurityIdentity('IS_AUTHENTICATED_ANONYMOUSLY'),
|
new RoleSecurityIdentity('IS_AUTHENTICATED_ANONYMOUSLY'),
|
||||||
)),
|
)),
|
||||||
array(new CustomUserImpl('johannes'), array('ROLE_FOO'), 'fullFledged', array(
|
array(new CustomUserImpl('johannes'), array('ROLE_FOO'), 'fullFledged', array(
|
||||||
new UserSecurityIdentity('johannes', 'Symfony\Component\Security\Tests\Acl\Domain\CustomUserImpl'),
|
new UserSecurityIdentity('johannes', 'Symfony\Component\Security\Acl\Tests\Domain\CustomUserImpl'),
|
||||||
new RoleSecurityIdentity('ROLE_FOO'),
|
new RoleSecurityIdentity('ROLE_FOO'),
|
||||||
new RoleSecurityIdentity('IS_AUTHENTICATED_FULLY'),
|
new RoleSecurityIdentity('IS_AUTHENTICATED_FULLY'),
|
||||||
new RoleSecurityIdentity('IS_AUTHENTICATED_REMEMBERED'),
|
new RoleSecurityIdentity('IS_AUTHENTICATED_REMEMBERED'),
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Acl\Domain;
|
namespace Symfony\Component\Security\Acl\Tests\Domain;
|
||||||
|
|
||||||
use Symfony\Component\Security\Acl\Domain\RoleSecurityIdentity;
|
use Symfony\Component\Security\Acl\Domain\RoleSecurityIdentity;
|
||||||
use Symfony\Component\Security\Acl\Domain\UserSecurityIdentity;
|
use Symfony\Component\Security\Acl\Domain\UserSecurityIdentity;
|
||||||
@ -27,10 +27,10 @@ class UserSecurityIdentityTest extends \PHPUnit_Framework_TestCase
|
|||||||
// Test that constructor never changes the type, even for proxies
|
// Test that constructor never changes the type, even for proxies
|
||||||
public function testConstructorWithProxy()
|
public function testConstructorWithProxy()
|
||||||
{
|
{
|
||||||
$id = new UserSecurityIdentity('foo', 'Acme\DemoBundle\Proxy\__CG__\Symfony\Component\Security\Tests\Acl\Domain\Foo');
|
$id = new UserSecurityIdentity('foo', 'Acme\DemoBundle\Proxy\__CG__\Symfony\Component\Security\Acl\Tests\Domain\Foo');
|
||||||
|
|
||||||
$this->assertEquals('foo', $id->getUsername());
|
$this->assertEquals('foo', $id->getUsername());
|
||||||
$this->assertEquals('Acme\DemoBundle\Proxy\__CG__\Symfony\Component\Security\Tests\Acl\Domain\Foo', $id->getClass());
|
$this->assertEquals('Acme\DemoBundle\Proxy\__CG__\Symfony\Component\Security\Acl\Tests\Domain\Foo', $id->getClass());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Acl\Permission;
|
namespace Symfony\Component\Security\Acl\Tests\Permission;
|
||||||
|
|
||||||
use Symfony\Component\Security\Acl\Permission\BasicPermissionMap;
|
use Symfony\Component\Security\Acl\Permission\BasicPermissionMap;
|
||||||
|
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Acl\Util;
|
namespace Symfony\Component\Security\Acl\Tests\Util;
|
||||||
|
|
||||||
use Symfony\Component\Security\Acl\Permission\MaskBuilder;
|
use Symfony\Component\Security\Acl\Permission\MaskBuilder;
|
||||||
|
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Acl\Voter;
|
namespace Symfony\Component\Security\Acl\Tests\Voter;
|
||||||
|
|
||||||
use Symfony\Component\Security\Acl\Exception\NoAceFoundException;
|
use Symfony\Component\Security\Acl\Exception\NoAceFoundException;
|
||||||
use Symfony\Component\Security\Acl\Voter\FieldVote;
|
use Symfony\Component\Security\Acl\Voter\FieldVote;
|
42
src/Symfony/Component/Security/Acl/composer.json
Normal file
42
src/Symfony/Component/Security/Acl/composer.json
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
"name": "symfony/security-acl",
|
||||||
|
"type": "library",
|
||||||
|
"description": "Symfony Security Component - ACL (Access Control List)",
|
||||||
|
"keywords": [],
|
||||||
|
"homepage": "http://symfony.com",
|
||||||
|
"license": "MIT",
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Fabien Potencier",
|
||||||
|
"email": "fabien@symfony.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Symfony Community",
|
||||||
|
"homepage": "http://symfony.com/contributors"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"require": {
|
||||||
|
"php": ">=5.3.3",
|
||||||
|
"symfony/security-core": "~2.4"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"doctrine/common": "~2.2",
|
||||||
|
"doctrine/dbal": "~2.2",
|
||||||
|
"psr/log": "~1.0"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"symfony/class-loader": "",
|
||||||
|
"symfony/finder": "",
|
||||||
|
"doctrine/dbal": "to use the built-in ACL implementation"
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-0": { "Symfony\\Component\\Security\\Acl\\": "" }
|
||||||
|
},
|
||||||
|
"target-dir": "Symfony/Component/Security/Acl",
|
||||||
|
"minimum-stability": "dev",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "2.4-dev"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
29
src/Symfony/Component/Security/Acl/phpunit.xml.dist
Normal file
29
src/Symfony/Component/Security/Acl/phpunit.xml.dist
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<phpunit backupGlobals="false"
|
||||||
|
backupStaticAttributes="false"
|
||||||
|
colors="true"
|
||||||
|
convertErrorsToExceptions="true"
|
||||||
|
convertNoticesToExceptions="true"
|
||||||
|
convertWarningsToExceptions="true"
|
||||||
|
processIsolation="false"
|
||||||
|
stopOnFailure="false"
|
||||||
|
syntaxCheck="false"
|
||||||
|
bootstrap="vendor/autoload.php"
|
||||||
|
>
|
||||||
|
<testsuites>
|
||||||
|
<testsuite name="Symfony Security Component ACL Test Suite">
|
||||||
|
<directory>./Tests/</directory>
|
||||||
|
</testsuite>
|
||||||
|
</testsuites>
|
||||||
|
|
||||||
|
<filter>
|
||||||
|
<whitelist>
|
||||||
|
<directory>./</directory>
|
||||||
|
<exclude>
|
||||||
|
<directory>./vendor</directory>
|
||||||
|
<directory>./Tests</directory>
|
||||||
|
</exclude>
|
||||||
|
</whitelist>
|
||||||
|
</filter>
|
||||||
|
</phpunit>
|
3
src/Symfony/Component/Security/Core/.gitignore
vendored
Normal file
3
src/Symfony/Component/Security/Core/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
vendor/
|
||||||
|
composer.lock
|
||||||
|
phpunit.xml
|
19
src/Symfony/Component/Security/Core/LICENSE
Normal file
19
src/Symfony/Component/Security/Core/LICENSE
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
Copyright (c) 2004-2013 Fabien Potencier
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is furnished
|
||||||
|
to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
23
src/Symfony/Component/Security/Core/README.md
Normal file
23
src/Symfony/Component/Security/Core/README.md
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
Security Component - Core
|
||||||
|
=========================
|
||||||
|
|
||||||
|
Security provides an infrastructure for sophisticated authorization systems,
|
||||||
|
which makes it possible to easily separate the actual authorization logic from
|
||||||
|
so called user providers that hold the users credentials. It is inspired by
|
||||||
|
the Java Spring framework.
|
||||||
|
|
||||||
|
Resources
|
||||||
|
---------
|
||||||
|
|
||||||
|
Documentation:
|
||||||
|
|
||||||
|
http://symfony.com/doc/2.4/book/security.html
|
||||||
|
|
||||||
|
Resources
|
||||||
|
---------
|
||||||
|
|
||||||
|
You can run the unit tests with the following command:
|
||||||
|
|
||||||
|
$ cd path/to/Symfony/Component/Security/Core/
|
||||||
|
$ composer.phar install --dev
|
||||||
|
$ phpunit
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Core\Authentication;
|
namespace Symfony\Component\Security\Core\Tests\Authentication;
|
||||||
|
|
||||||
use Symfony\Component\Security\Core\Authentication\AuthenticationProviderManager;
|
use Symfony\Component\Security\Core\Authentication\AuthenticationProviderManager;
|
||||||
use Symfony\Component\Security\Core\Exception\ProviderNotFoundException;
|
use Symfony\Component\Security\Core\Exception\ProviderNotFoundException;
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Core\Authentication;
|
namespace Symfony\Component\Security\Core\Tests\Authentication;
|
||||||
|
|
||||||
use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken;
|
use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken;
|
||||||
use Symfony\Component\Security\Core\Authentication\Token\RememberMeToken;
|
use Symfony\Component\Security\Core\Authentication\Token\RememberMeToken;
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Core\Authentication\Provider;
|
namespace Symfony\Component\Security\Core\Tests\Authentication\Provider;
|
||||||
|
|
||||||
use Symfony\Component\Security\Core\Authentication\Provider\AnonymousAuthenticationProvider;
|
use Symfony\Component\Security\Core\Authentication\Provider\AnonymousAuthenticationProvider;
|
||||||
|
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Core\Authentication\Provider;
|
namespace Symfony\Component\Security\Core\Tests\Authentication\Provider;
|
||||||
|
|
||||||
use Symfony\Component\Security\Core\Encoder\PlaintextPasswordEncoder;
|
use Symfony\Component\Security\Core\Encoder\PlaintextPasswordEncoder;
|
||||||
|
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Core\Authentication\Provider;
|
namespace Symfony\Component\Security\Core\Tests\Authentication\Provider;
|
||||||
|
|
||||||
use Symfony\Component\Security\Core\Authentication\Provider\PreAuthenticatedAuthenticationProvider;
|
use Symfony\Component\Security\Core\Authentication\Provider\PreAuthenticatedAuthenticationProvider;
|
||||||
|
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Core\Authentication\Provider;
|
namespace Symfony\Component\Security\Core\Tests\Authentication\Provider;
|
||||||
|
|
||||||
use Symfony\Component\Security\Core\Authentication\Provider\RememberMeAuthenticationProvider;
|
use Symfony\Component\Security\Core\Authentication\Provider\RememberMeAuthenticationProvider;
|
||||||
use Symfony\Component\Security\Core\Authentication\Token\RememberMeToken;
|
use Symfony\Component\Security\Core\Authentication\Token\RememberMeToken;
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Core\Authentication\Provider;
|
namespace Symfony\Component\Security\Core\Tests\Authentication\Provider;
|
||||||
|
|
||||||
use Symfony\Component\Security\Core\Authentication\Provider\UserAuthenticationProvider;
|
use Symfony\Component\Security\Core\Authentication\Provider\UserAuthenticationProvider;
|
||||||
use Symfony\Component\Security\Core\Role\Role;
|
use Symfony\Component\Security\Core\Role\Role;
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Core\Authentication\RememberMe;
|
namespace Symfony\Component\Security\Core\Tests\Authentication\RememberMe;
|
||||||
|
|
||||||
use Symfony\Component\Security\Core\Authentication\RememberMe\PersistentToken;
|
use Symfony\Component\Security\Core\Authentication\RememberMe\PersistentToken;
|
||||||
use Symfony\Component\Security\Core\Authentication\RememberMe\InMemoryTokenProvider;
|
use Symfony\Component\Security\Core\Authentication\RememberMe\InMemoryTokenProvider;
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Core\Authentication\RememberMe;
|
namespace Symfony\Component\Security\Core\Tests\Authentication\RememberMe;
|
||||||
|
|
||||||
use Symfony\Component\Security\Core\Authentication\RememberMe\PersistentToken;
|
use Symfony\Component\Security\Core\Authentication\RememberMe\PersistentToken;
|
||||||
|
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Core\Authentication\Token;
|
namespace Symfony\Component\Security\Core\Tests\Authentication\Token;
|
||||||
|
|
||||||
use Symfony\Component\Security\Core\Role\Role;
|
use Symfony\Component\Security\Core\Role\Role;
|
||||||
|
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Core\Authentication\Token;
|
namespace Symfony\Component\Security\Core\Tests\Authentication\Token;
|
||||||
|
|
||||||
use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken;
|
use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken;
|
||||||
use Symfony\Component\Security\Core\Role\Role;
|
use Symfony\Component\Security\Core\Role\Role;
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Core\Authentication\Token;
|
namespace Symfony\Component\Security\Core\Tests\Authentication\Token;
|
||||||
|
|
||||||
use Symfony\Component\Security\Core\Authentication\Token\PreAuthenticatedToken;
|
use Symfony\Component\Security\Core\Authentication\Token\PreAuthenticatedToken;
|
||||||
use Symfony\Component\Security\Core\Role\Role;
|
use Symfony\Component\Security\Core\Role\Role;
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Core\Authentication\Token;
|
namespace Symfony\Component\Security\Core\Tests\Authentication\Token;
|
||||||
|
|
||||||
use Symfony\Component\Security\Core\Authentication\Token\RememberMeToken;
|
use Symfony\Component\Security\Core\Authentication\Token\RememberMeToken;
|
||||||
use Symfony\Component\Security\Core\Role\Role;
|
use Symfony\Component\Security\Core\Role\Role;
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Core\Authentication\Token;
|
namespace Symfony\Component\Security\Core\Tests\Authentication\Token;
|
||||||
|
|
||||||
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
|
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
|
||||||
use Symfony\Component\Security\Core\Role\Role;
|
use Symfony\Component\Security\Core\Role\Role;
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Core\Authorization;
|
namespace Symfony\Component\Security\Core\Tests\Authorization;
|
||||||
|
|
||||||
use Symfony\Component\Security\Core\Authorization\AccessDecisionManager;
|
use Symfony\Component\Security\Core\Authorization\AccessDecisionManager;
|
||||||
use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface;
|
use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface;
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Core\Authorization\Voter;
|
namespace Symfony\Component\Security\Core\Tests\Authorization\Voter;
|
||||||
|
|
||||||
use Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolver;
|
use Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolver;
|
||||||
use Symfony\Component\Security\Core\Authorization\Voter\AuthenticatedVoter;
|
use Symfony\Component\Security\Core\Authorization\Voter\AuthenticatedVoter;
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Core\Authorization\Voter;
|
namespace Symfony\Component\Security\Core\Tests\Authorization\Voter;
|
||||||
|
|
||||||
use Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter;
|
use Symfony\Component\Security\Core\Authorization\Voter\RoleHierarchyVoter;
|
||||||
use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface;
|
use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface;
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Core\Authorization\Voter;
|
namespace Symfony\Component\Security\Core\Tests\Authorization\Voter;
|
||||||
|
|
||||||
use Symfony\Component\Security\Core\Authorization\Voter\RoleVoter;
|
use Symfony\Component\Security\Core\Authorization\Voter\RoleVoter;
|
||||||
use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface;
|
use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface;
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Core\Encoder;
|
namespace Symfony\Component\Security\Core\Tests\Encoder;
|
||||||
|
|
||||||
use Symfony\Component\Security\Core\Encoder\BCryptPasswordEncoder;
|
use Symfony\Component\Security\Core\Encoder\BCryptPasswordEncoder;
|
||||||
|
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Core\Encoder;
|
namespace Symfony\Component\Security\Core\Tests\Encoder;
|
||||||
|
|
||||||
use Symfony\Component\Security\Core\Encoder\BasePasswordEncoder;
|
use Symfony\Component\Security\Core\Encoder\BasePasswordEncoder;
|
||||||
|
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Core\Encoder;
|
namespace Symfony\Component\Security\Core\Tests\Encoder;
|
||||||
|
|
||||||
use Symfony\Component\Security\Core\Encoder\MessageDigestPasswordEncoder;
|
use Symfony\Component\Security\Core\Encoder\MessageDigestPasswordEncoder;
|
||||||
use Symfony\Component\Security\Core\Encoder\EncoderFactory;
|
use Symfony\Component\Security\Core\Encoder\EncoderFactory;
|
||||||
@ -52,7 +52,7 @@ class EncoderFactoryTest extends \PHPUnit_Framework_TestCase
|
|||||||
'Symfony\Component\Security\Core\User\UserInterface' => new MessageDigestPasswordEncoder('sha1'),
|
'Symfony\Component\Security\Core\User\UserInterface' => new MessageDigestPasswordEncoder('sha1'),
|
||||||
));
|
));
|
||||||
|
|
||||||
$encoder = $factory->getEncoder('Symfony\Component\Security\Tests\Core\Encoder\SomeChildUser');
|
$encoder = $factory->getEncoder('Symfony\Component\Security\Core\Tests\Encoder\SomeChildUser');
|
||||||
$expectedEncoder = new MessageDigestPasswordEncoder('sha1');
|
$expectedEncoder = new MessageDigestPasswordEncoder('sha1');
|
||||||
$this->assertEquals($expectedEncoder->encodePassword('foo', ''), $encoder->encodePassword('foo', ''));
|
$this->assertEquals($expectedEncoder->encodePassword('foo', ''), $encoder->encodePassword('foo', ''));
|
||||||
}
|
}
|
||||||
@ -71,10 +71,10 @@ class EncoderFactoryTest extends \PHPUnit_Framework_TestCase
|
|||||||
public function testGetEncoderConfiguredForConcreteClassWithClassName()
|
public function testGetEncoderConfiguredForConcreteClassWithClassName()
|
||||||
{
|
{
|
||||||
$factory = new EncoderFactory(array(
|
$factory = new EncoderFactory(array(
|
||||||
'Symfony\Component\Security\Tests\Core\Encoder\SomeUser' => new MessageDigestPasswordEncoder('sha1'),
|
'Symfony\Component\Security\Core\Tests\Encoder\SomeUser' => new MessageDigestPasswordEncoder('sha1'),
|
||||||
));
|
));
|
||||||
|
|
||||||
$encoder = $factory->getEncoder('Symfony\Component\Security\Tests\Core\Encoder\SomeChildUser');
|
$encoder = $factory->getEncoder('Symfony\Component\Security\Core\Tests\Encoder\SomeChildUser');
|
||||||
$expectedEncoder = new MessageDigestPasswordEncoder('sha1');
|
$expectedEncoder = new MessageDigestPasswordEncoder('sha1');
|
||||||
$this->assertEquals($expectedEncoder->encodePassword('foo', ''), $encoder->encodePassword('foo', ''));
|
$this->assertEquals($expectedEncoder->encodePassword('foo', ''), $encoder->encodePassword('foo', ''));
|
||||||
}
|
}
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Core\Encoder;
|
namespace Symfony\Component\Security\Core\Tests\Encoder;
|
||||||
|
|
||||||
use Symfony\Component\Security\Core\Encoder\MessageDigestPasswordEncoder;
|
use Symfony\Component\Security\Core\Encoder\MessageDigestPasswordEncoder;
|
||||||
|
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Core\Encoder;
|
namespace Symfony\Component\Security\Core\Tests\Encoder;
|
||||||
|
|
||||||
use Symfony\Component\Security\Core\Encoder\Pbkdf2PasswordEncoder;
|
use Symfony\Component\Security\Core\Encoder\Pbkdf2PasswordEncoder;
|
||||||
|
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Core\Encoder;
|
namespace Symfony\Component\Security\Core\Tests\Encoder;
|
||||||
|
|
||||||
use Symfony\Component\Security\Core\Encoder\PlaintextPasswordEncoder;
|
use Symfony\Component\Security\Core\Encoder\PlaintextPasswordEncoder;
|
||||||
|
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Core\Role;
|
namespace Symfony\Component\Security\Core\Tests\Role;
|
||||||
|
|
||||||
use Symfony\Component\Security\Core\Role\RoleHierarchy;
|
use Symfony\Component\Security\Core\Role\RoleHierarchy;
|
||||||
use Symfony\Component\Security\Core\Role\Role;
|
use Symfony\Component\Security\Core\Role\Role;
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Core\Role;
|
namespace Symfony\Component\Security\Core\Tests\Role;
|
||||||
|
|
||||||
use Symfony\Component\Security\Core\Role\Role;
|
use Symfony\Component\Security\Core\Role\Role;
|
||||||
|
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Core\Role;
|
namespace Symfony\Component\Security\Core\Tests\Role;
|
||||||
|
|
||||||
use Symfony\Component\Security\Core\Role\SwitchUserRole;
|
use Symfony\Component\Security\Core\Role\SwitchUserRole;
|
||||||
|
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Core;
|
namespace Symfony\Component\Security\Core\Tests;
|
||||||
|
|
||||||
use Symfony\Component\Security\Core\SecurityContext;
|
use Symfony\Component\Security\Core\SecurityContext;
|
||||||
|
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Core\User;
|
namespace Symfony\Component\Security\Core\Tests\User;
|
||||||
|
|
||||||
use Symfony\Component\Security\Core\User\UserChecker;
|
use Symfony\Component\Security\Core\User\UserChecker;
|
||||||
|
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Core\User;
|
namespace Symfony\Component\Security\Core\Tests\User;
|
||||||
|
|
||||||
use Symfony\Component\Security\Core\Exception\UnsupportedUserException;
|
use Symfony\Component\Security\Core\Exception\UnsupportedUserException;
|
||||||
|
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Core\User;
|
namespace Symfony\Component\Security\Core\Tests\User;
|
||||||
|
|
||||||
use Symfony\Component\Security\Core\User\InMemoryUserProvider;
|
use Symfony\Component\Security\Core\User\InMemoryUserProvider;
|
||||||
use Symfony\Component\Security\Core\User\User;
|
use Symfony\Component\Security\Core\User\User;
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Core\User;
|
namespace Symfony\Component\Security\Core\Tests\User;
|
||||||
|
|
||||||
use Symfony\Component\Security\Core\User\User;
|
use Symfony\Component\Security\Core\User\User;
|
||||||
|
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Core\Util
|
namespace Symfony\Component\Security\Core\Tests\Util
|
||||||
{
|
{
|
||||||
use Symfony\Component\Security\Core\Util\ClassUtils;
|
use Symfony\Component\Security\Core\Util\ClassUtils;
|
||||||
|
|
||||||
@ -22,9 +22,9 @@ namespace Symfony\Component\Security\Tests\Core\Util
|
|||||||
array('Symfony\Component\Security\Core\Util\ClassUtils', 'Symfony\Component\Security\Core\Util\ClassUtils'),
|
array('Symfony\Component\Security\Core\Util\ClassUtils', 'Symfony\Component\Security\Core\Util\ClassUtils'),
|
||||||
array('MyProject\Proxies\__CG__\stdClass', 'stdClass'),
|
array('MyProject\Proxies\__CG__\stdClass', 'stdClass'),
|
||||||
array('MyProject\Proxies\__CG__\OtherProject\Proxies\__CG__\stdClass', 'stdClass'),
|
array('MyProject\Proxies\__CG__\OtherProject\Proxies\__CG__\stdClass', 'stdClass'),
|
||||||
array('MyProject\Proxies\__CG__\Symfony\Component\Security\Tests\Core\Util\ChildObject', 'Symfony\Component\Security\Tests\Core\Util\ChildObject'),
|
array('MyProject\Proxies\__CG__\Symfony\Component\Security\Core\Tests\Util\ChildObject', 'Symfony\Component\Security\Core\Tests\Util\ChildObject'),
|
||||||
array(new TestObject(), 'Symfony\Component\Security\Tests\Core\Util\TestObject'),
|
array(new TestObject(), 'Symfony\Component\Security\Core\Tests\Util\TestObject'),
|
||||||
array(new \Acme\DemoBundle\Proxy\__CG__\Symfony\Component\Security\Tests\Core\Util\TestObject(), 'Symfony\Component\Security\Tests\Core\Util\TestObject'),
|
array(new \Acme\DemoBundle\Proxy\__CG__\Symfony\Component\Security\Core\Tests\Util\TestObject(), 'Symfony\Component\Security\Core\Tests\Util\TestObject'),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -42,9 +42,9 @@ namespace Symfony\Component\Security\Tests\Core\Util
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace Acme\DemoBundle\Proxy\__CG__\Symfony\Component\Security\Tests\Core\Util
|
namespace Acme\DemoBundle\Proxy\__CG__\Symfony\Component\Security\Core\Tests\Util
|
||||||
{
|
{
|
||||||
class TestObject extends \Symfony\Component\Security\Tests\Core\Util\TestObject
|
class TestObject extends \Symfony\Component\Security\Core\Tests\Util\TestObject
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Core\Util;
|
namespace Symfony\Component\Security\Core\Tests\Util;
|
||||||
|
|
||||||
use Symfony\Component\Security\Core\Util\SecureRandom;
|
use Symfony\Component\Security\Core\Util\SecureRandom;
|
||||||
|
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Core\Util;
|
namespace Symfony\Component\Security\Core\Tests\Util;
|
||||||
|
|
||||||
use Symfony\Component\Security\Core\Util\StringUtils;
|
use Symfony\Component\Security\Core\Util\StringUtils;
|
||||||
|
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Core\Validator\Constraints;
|
namespace Symfony\Component\Security\Core\Tests\Validator\Constraints;
|
||||||
|
|
||||||
use Symfony\Component\Security\Core\Validator\Constraints\UserPassword;
|
use Symfony\Component\Security\Core\Validator\Constraints\UserPassword;
|
||||||
use Symfony\Component\Security\Core\Validator\Constraints\UserPasswordValidator;
|
use Symfony\Component\Security\Core\Validator\Constraints\UserPasswordValidator;
|
42
src/Symfony/Component/Security/Core/composer.json
Normal file
42
src/Symfony/Component/Security/Core/composer.json
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
"name": "symfony/security-core",
|
||||||
|
"type": "library",
|
||||||
|
"description": "Symfony Security Component - Core Library",
|
||||||
|
"keywords": [],
|
||||||
|
"homepage": "http://symfony.com",
|
||||||
|
"license": "MIT",
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Fabien Potencier",
|
||||||
|
"email": "fabien@symfony.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Symfony Community",
|
||||||
|
"homepage": "http://symfony.com/contributors"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"require": {
|
||||||
|
"php": ">=5.3.3",
|
||||||
|
"symfony/event-dispatcher": "~2.1",
|
||||||
|
"symfony/http-foundation": "~2.4"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"symfony/validator": "~2.2",
|
||||||
|
"psr/log": "~1.0",
|
||||||
|
"ircmaxell/password-compat": "1.0.*"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"symfony/validator": "",
|
||||||
|
"ircmaxell/password-compat": ""
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-0": { "Symfony\\Component\\Security\\Core\\": "" }
|
||||||
|
},
|
||||||
|
"target-dir": "Symfony/Component/Security/Core",
|
||||||
|
"minimum-stability": "dev",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "2.4-dev"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
29
src/Symfony/Component/Security/Core/phpunit.xml.dist
Normal file
29
src/Symfony/Component/Security/Core/phpunit.xml.dist
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<phpunit backupGlobals="false"
|
||||||
|
backupStaticAttributes="false"
|
||||||
|
colors="true"
|
||||||
|
convertErrorsToExceptions="true"
|
||||||
|
convertNoticesToExceptions="true"
|
||||||
|
convertWarningsToExceptions="true"
|
||||||
|
processIsolation="false"
|
||||||
|
stopOnFailure="false"
|
||||||
|
syntaxCheck="false"
|
||||||
|
bootstrap="vendor/autoload.php"
|
||||||
|
>
|
||||||
|
<testsuites>
|
||||||
|
<testsuite name="Symfony Security Component Core Test Suite">
|
||||||
|
<directory>./Tests/</directory>
|
||||||
|
</testsuite>
|
||||||
|
</testsuites>
|
||||||
|
|
||||||
|
<filter>
|
||||||
|
<whitelist>
|
||||||
|
<directory>./</directory>
|
||||||
|
<exclude>
|
||||||
|
<directory>./vendor</directory>
|
||||||
|
<directory>./Tests</directory>
|
||||||
|
</exclude>
|
||||||
|
</whitelist>
|
||||||
|
</filter>
|
||||||
|
</phpunit>
|
3
src/Symfony/Component/Security/Http/.gitignore
vendored
Normal file
3
src/Symfony/Component/Security/Http/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
vendor/
|
||||||
|
composer.lock
|
||||||
|
phpunit.xml
|
19
src/Symfony/Component/Security/Http/LICENSE
Normal file
19
src/Symfony/Component/Security/Http/LICENSE
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
Copyright (c) 2004-2013 Fabien Potencier
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is furnished
|
||||||
|
to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
23
src/Symfony/Component/Security/Http/README.md
Normal file
23
src/Symfony/Component/Security/Http/README.md
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
Security Component - HTTP Integration
|
||||||
|
=====================================
|
||||||
|
|
||||||
|
Security provides an infrastructure for sophisticated authorization systems,
|
||||||
|
which makes it possible to easily separate the actual authorization logic from
|
||||||
|
so called user providers that hold the users credentials. It is inspired by
|
||||||
|
the Java Spring framework.
|
||||||
|
|
||||||
|
Resources
|
||||||
|
---------
|
||||||
|
|
||||||
|
Documentation:
|
||||||
|
|
||||||
|
http://symfony.com/doc/2.4/book/security.html
|
||||||
|
|
||||||
|
Resources
|
||||||
|
---------
|
||||||
|
|
||||||
|
You can run the unit tests with the following command:
|
||||||
|
|
||||||
|
$ cd path/to/Symfony/Component/Security/Http/
|
||||||
|
$ composer.phar install --dev
|
||||||
|
$ phpunit
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Http;
|
namespace Symfony\Component\Security\Http\Tests;
|
||||||
|
|
||||||
use Symfony\Component\Security\Http\AccessMap;
|
use Symfony\Component\Security\Http\AccessMap;
|
||||||
|
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Http;
|
namespace Symfony\Component\Security\Http\Tests;
|
||||||
|
|
||||||
use Symfony\Component\Security\Http\Authentication\DefaultAuthenticationFailureHandler;
|
use Symfony\Component\Security\Http\Authentication\DefaultAuthenticationFailureHandler;
|
||||||
use Symfony\Component\Security\Core\SecurityContextInterface;
|
use Symfony\Component\Security\Core\SecurityContextInterface;
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Http;
|
namespace Symfony\Component\Security\Http\Tests;
|
||||||
|
|
||||||
use Symfony\Component\Security\Http\Authentication\DefaultAuthenticationSuccessHandler;
|
use Symfony\Component\Security\Http\Authentication\DefaultAuthenticationSuccessHandler;
|
||||||
|
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Http\EntryPoint;
|
namespace Symfony\Component\Security\Http\Tests\EntryPoint;
|
||||||
|
|
||||||
use Symfony\Component\Security\Http\EntryPoint\BasicAuthenticationEntryPoint;
|
use Symfony\Component\Security\Http\EntryPoint\BasicAuthenticationEntryPoint;
|
||||||
use Symfony\Component\Security\Core\Exception\AuthenticationException;
|
use Symfony\Component\Security\Core\Exception\AuthenticationException;
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Http\EntryPoint;
|
namespace Symfony\Component\Security\Http\Tests\EntryPoint;
|
||||||
|
|
||||||
use Symfony\Component\Security\Http\EntryPoint\DigestAuthenticationEntryPoint;
|
use Symfony\Component\Security\Http\EntryPoint\DigestAuthenticationEntryPoint;
|
||||||
use Symfony\Component\Security\Core\Exception\AuthenticationException;
|
use Symfony\Component\Security\Core\Exception\AuthenticationException;
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Http\EntryPoint;
|
namespace Symfony\Component\Security\Http\Tests\EntryPoint;
|
||||||
|
|
||||||
use Symfony\Component\Security\Http\EntryPoint\FormAuthenticationEntryPoint;
|
use Symfony\Component\Security\Http\EntryPoint\FormAuthenticationEntryPoint;
|
||||||
use Symfony\Component\HttpKernel\HttpKernelInterface;
|
use Symfony\Component\HttpKernel\HttpKernelInterface;
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Http\EntryPoint;
|
namespace Symfony\Component\Security\Http\Tests\EntryPoint;
|
||||||
|
|
||||||
use Symfony\Component\Security\Http\EntryPoint\RetryAuthenticationEntryPoint;
|
use Symfony\Component\Security\Http\EntryPoint\RetryAuthenticationEntryPoint;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Http\Firewall;
|
namespace Symfony\Component\Security\Http\Tests\Firewall;
|
||||||
|
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Symfony\Component\Security\Core\Authentication\Token\PreAuthenticatedToken;
|
use Symfony\Component\Security\Core\Authentication\Token\PreAuthenticatedToken;
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Http\Firewall;
|
namespace Symfony\Component\Security\Http\Tests\Firewall;
|
||||||
|
|
||||||
use Symfony\Component\Security\Http\Firewall\AccessListener;
|
use Symfony\Component\Security\Http\Firewall\AccessListener;
|
||||||
|
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Http\Firewall;
|
namespace Symfony\Component\Security\Http\Tests\Firewall;
|
||||||
|
|
||||||
use Symfony\Component\Security\Http\Firewall\AnonymousAuthenticationListener;
|
use Symfony\Component\Security\Http\Firewall\AnonymousAuthenticationListener;
|
||||||
|
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Http\Firewall;
|
namespace Symfony\Component\Security\Http\Tests\Firewall;
|
||||||
|
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Symfony\Component\Security\Core\Authentication\Token\PreAuthenticatedToken;
|
use Symfony\Component\Security\Core\Authentication\Token\PreAuthenticatedToken;
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Http\Firewall;
|
namespace Symfony\Component\Security\Http\Tests\Firewall;
|
||||||
|
|
||||||
use Symfony\Component\Security\Http\Firewall\ChannelListener;
|
use Symfony\Component\Security\Http\Firewall\ChannelListener;
|
||||||
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
|
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Http\Firewall;
|
namespace Symfony\Component\Security\Http\Tests\Firewall;
|
||||||
|
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Http\Firewall;
|
namespace Symfony\Component\Security\Http\Tests\Firewall;
|
||||||
|
|
||||||
use Symfony\Component\Security\Http\Firewall\DigestData;
|
use Symfony\Component\Security\Http\Firewall\DigestData;
|
||||||
|
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Http\Firewall;
|
namespace Symfony\Component\Security\Http\Tests\Firewall;
|
||||||
|
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Http\Firewall;
|
namespace Symfony\Component\Security\Http\Tests\Firewall;
|
||||||
|
|
||||||
use Symfony\Component\Security\Core\Exception\AuthenticationException;
|
use Symfony\Component\Security\Core\Exception\AuthenticationException;
|
||||||
use Symfony\Component\Security\Http\Firewall\RememberMeListener;
|
use Symfony\Component\Security\Http\Firewall\RememberMeListener;
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Http\Firewall;
|
namespace Symfony\Component\Security\Http\Tests\Firewall;
|
||||||
|
|
||||||
use Symfony\Component\Security\Http\Firewall\SwitchUserListener;
|
use Symfony\Component\Security\Http\Firewall\SwitchUserListener;
|
||||||
|
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Http\Firewall;
|
namespace Symfony\Component\Security\Http\Tests\Firewall;
|
||||||
|
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Symfony\Component\Security\Http\Firewall\X509AuthenticationListener;
|
use Symfony\Component\Security\Http\Firewall\X509AuthenticationListener;
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Http;
|
namespace Symfony\Component\Security\Http\Tests;
|
||||||
|
|
||||||
use Symfony\Component\Security\Http\FirewallMap;
|
use Symfony\Component\Security\Http\FirewallMap;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Http;
|
namespace Symfony\Component\Security\Http\Tests;
|
||||||
|
|
||||||
use Symfony\Component\Security\Http\Firewall;
|
use Symfony\Component\Security\Http\Firewall;
|
||||||
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
|
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Http;
|
namespace Symfony\Component\Security\Http\Tests;
|
||||||
|
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Symfony\Component\Routing\Exception\MethodNotAllowedException;
|
use Symfony\Component\Routing\Exception\MethodNotAllowedException;
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Http\Logout;
|
namespace Symfony\Component\Security\Http\Tests\Logout;
|
||||||
|
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
use Symfony\Component\HttpFoundation\ResponseHeaderBag;
|
use Symfony\Component\HttpFoundation\ResponseHeaderBag;
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Http\Logout;
|
namespace Symfony\Component\Security\Http\Tests\Logout;
|
||||||
|
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
use Symfony\Component\Security\Http\Logout\DefaultLogoutSuccessHandler;
|
use Symfony\Component\Security\Http\Logout\DefaultLogoutSuccessHandler;
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Http\Logout;
|
namespace Symfony\Component\Security\Http\Tests\Logout;
|
||||||
|
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
use Symfony\Component\Security\Http\Logout\SessionLogoutHandler;
|
use Symfony\Component\Security\Http\Logout\SessionLogoutHandler;
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Http\RememberMe;
|
namespace Symfony\Component\Security\Http\Tests\RememberMe;
|
||||||
|
|
||||||
use Symfony\Component\Security\Http\RememberMe\RememberMeServicesInterface;
|
use Symfony\Component\Security\Http\RememberMe\RememberMeServicesInterface;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Http\RememberMe;
|
namespace Symfony\Component\Security\Http\Tests\RememberMe;
|
||||||
|
|
||||||
use Symfony\Component\Security\Http\RememberMe\RememberMeServicesInterface;
|
use Symfony\Component\Security\Http\RememberMe\RememberMeServicesInterface;
|
||||||
|
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Http\RememberMe;
|
namespace Symfony\Component\Security\Http\Tests\RememberMe;
|
||||||
|
|
||||||
use Symfony\Component\Security\Http\RememberMe\ResponseListener;
|
use Symfony\Component\Security\Http\RememberMe\ResponseListener;
|
||||||
use Symfony\Component\Security\Http\RememberMe\RememberMeServicesInterface;
|
use Symfony\Component\Security\Http\RememberMe\RememberMeServicesInterface;
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Http\RememberMe;
|
namespace Symfony\Component\Security\Http\Tests\RememberMe;
|
||||||
|
|
||||||
use Symfony\Component\Security\Http\RememberMe\RememberMeServicesInterface;
|
use Symfony\Component\Security\Http\RememberMe\RememberMeServicesInterface;
|
||||||
|
|
@ -9,7 +9,7 @@
|
|||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Tests\Http\Session;
|
namespace Symfony\Component\Security\Http\Tests\Session;
|
||||||
|
|
||||||
use Symfony\Component\Security\Http\Session\SessionAuthenticationStrategy;
|
use Symfony\Component\Security\Http\Session\SessionAuthenticationStrategy;
|
||||||
|
|
44
src/Symfony/Component/Security/Http/composer.json
Normal file
44
src/Symfony/Component/Security/Http/composer.json
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
{
|
||||||
|
"name": "symfony/security-http",
|
||||||
|
"type": "library",
|
||||||
|
"description": "Symfony Security Component - HTTP Integration",
|
||||||
|
"keywords": [],
|
||||||
|
"homepage": "http://symfony.com",
|
||||||
|
"license": "MIT",
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Fabien Potencier",
|
||||||
|
"email": "fabien@symfony.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Symfony Community",
|
||||||
|
"homepage": "http://symfony.com/contributors"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"require": {
|
||||||
|
"php": ">=5.3.3",
|
||||||
|
"symfony/security-core": "~2.4",
|
||||||
|
"symfony/event-dispatcher": "~2.1",
|
||||||
|
"symfony/http-foundation": "~2.4",
|
||||||
|
"symfony/http-kernel": "~2.4"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"symfony/form": "~2.0",
|
||||||
|
"symfony/routing": "~2.2",
|
||||||
|
"psr/log": "~1.0"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"symfony/form": "",
|
||||||
|
"symfony/routing": ""
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-0": { "Symfony\\Component\\Security\\Http\\": "" }
|
||||||
|
},
|
||||||
|
"target-dir": "Symfony/Component/Security/Http",
|
||||||
|
"minimum-stability": "dev",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "2.4-dev"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
29
src/Symfony/Component/Security/Http/phpunit.xml.dist
Normal file
29
src/Symfony/Component/Security/Http/phpunit.xml.dist
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<phpunit backupGlobals="false"
|
||||||
|
backupStaticAttributes="false"
|
||||||
|
colors="true"
|
||||||
|
convertErrorsToExceptions="true"
|
||||||
|
convertNoticesToExceptions="true"
|
||||||
|
convertWarningsToExceptions="true"
|
||||||
|
processIsolation="false"
|
||||||
|
stopOnFailure="false"
|
||||||
|
syntaxCheck="false"
|
||||||
|
bootstrap="vendor/autoload.php"
|
||||||
|
>
|
||||||
|
<testsuites>
|
||||||
|
<testsuite name="Symfony Security Component HTTP Test Suite">
|
||||||
|
<directory>./Tests/</directory>
|
||||||
|
</testsuite>
|
||||||
|
</testsuites>
|
||||||
|
|
||||||
|
<filter>
|
||||||
|
<whitelist>
|
||||||
|
<directory>./</directory>
|
||||||
|
<exclude>
|
||||||
|
<directory>./vendor</directory>
|
||||||
|
<directory>./Tests</directory>
|
||||||
|
</exclude>
|
||||||
|
</whitelist>
|
||||||
|
</filter>
|
||||||
|
</phpunit>
|
@ -21,6 +21,11 @@
|
|||||||
"symfony/http-foundation": "~2.1",
|
"symfony/http-foundation": "~2.1",
|
||||||
"symfony/http-kernel": "~2.4"
|
"symfony/http-kernel": "~2.4"
|
||||||
},
|
},
|
||||||
|
"replace": {
|
||||||
|
"symfony/security-acl": "self.version",
|
||||||
|
"symfony/security-core": "self.version",
|
||||||
|
"symfony/security-http": "self.version"
|
||||||
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"symfony/form": "~2.0",
|
"symfony/form": "~2.0",
|
||||||
"symfony/routing": "~2.2",
|
"symfony/routing": "~2.2",
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user