@@ -17,7 +17,6 @@ |
||
17 | 17 | private $obfuscatedPatterns; |
18 | 18 | |
19 | 19 | /** |
20 | - * @param array $data data |
|
21 | 20 | */ |
22 | 21 | public function __construct(array $obfuscatedPatterns) |
23 | 22 | { |
@@ -3,7 +3,6 @@ |
||
3 | 3 | namespace Rezzza\SecurityBundle\DataCollector; |
4 | 4 | |
5 | 5 | use Doctrine\Common\Annotations\Reader as AnnotationReader; |
6 | -use Doctrine\Common\Util\ClassUtils; |
|
7 | 6 | use Symfony\Component\HttpFoundation\Request; |
8 | 7 | use Symfony\Component\HttpFoundation\Response; |
9 | 8 | use Symfony\Component\HttpKernel\DataCollector\RequestDataCollector as BaseRequestDataCollector; |
@@ -3,7 +3,6 @@ |
||
3 | 3 | namespace Rezzza\SecurityBundle\Tests\Units\Security\Firewall; |
4 | 4 | |
5 | 5 | use mageekguy\atoum; |
6 | - |
|
7 | 6 | use Rezzza\SecurityBundle\Security\Firewall\ReplayProtection as SUT; |
8 | 7 | |
9 | 8 | class ReplayProtection extends atoum\test |
@@ -3,7 +3,6 @@ |
||
3 | 3 | namespace Rezzza\SecurityBundle\Tests\Units\Security\Firewall; |
4 | 4 | |
5 | 5 | use mageekguy\atoum; |
6 | - |
|
7 | 6 | use Rezzza\SecurityBundle\Security\Firewall\SignedRequest as SUT; |
8 | 7 | |
9 | 8 | class SignedRequest extends atoum\test |
@@ -43,6 +43,10 @@ discard block |
||
43 | 43 | return 'request_signature'; |
44 | 44 | } |
45 | 45 | |
46 | + /** |
|
47 | + * @param ContainerBuilder $container |
|
48 | + * @param string $id |
|
49 | + */ |
|
46 | 50 | public function createSignatureConfig($container, $id, $config) |
47 | 51 | { |
48 | 52 | $signatureConfigId = 'rezzza.security.request_signature.signature_config.'.$id; |
@@ -56,6 +60,10 @@ discard block |
||
56 | 60 | return $signatureConfigId; |
57 | 61 | } |
58 | 62 | |
63 | + /** |
|
64 | + * @param ContainerBuilder $container |
|
65 | + * @param string $id |
|
66 | + */ |
|
59 | 67 | public function createSignatureQueryParameters($container, $id, $config) |
60 | 68 | { |
61 | 69 | $signatureQueryParametersId = 'rezzza.security.request_signature.signature_query_parameters.'.$id; |
@@ -68,6 +76,10 @@ discard block |
||
68 | 76 | return $signatureQueryParametersId; |
69 | 77 | } |
70 | 78 | |
79 | + /** |
|
80 | + * @param ContainerBuilder $container |
|
81 | + * @param string $id |
|
82 | + */ |
|
71 | 83 | public function createReplayProtection($container, $id, $config) |
72 | 84 | { |
73 | 85 | $replayProtectionId = 'rezzza.security.request_signature.replay_protection.'.$id; |
@@ -54,11 +54,18 @@ |
||
54 | 54 | $this->visitPath($urlSigned); |
55 | 55 | } |
56 | 56 | |
57 | + /** |
|
58 | + * @param string $signature |
|
59 | + * @param integer $timestamp |
|
60 | + */ |
|
57 | 61 | private function buildUrlSigned($url, $signature, $timestamp) |
58 | 62 | { |
59 | 63 | return sprintf('%s?_signature=%s&_signature_ttl=%s', $url, $signature, $timestamp); |
60 | 64 | } |
61 | 65 | |
66 | + /** |
|
67 | + * @param integer $timestamp |
|
68 | + */ |
|
62 | 69 | private function buildSignature($url, $timestamp) |
63 | 70 | { |
64 | 71 | $signedRequest = new SignedRequest('GET', 'security-bundle.vlr.localtest', $url, '', $timestamp); |
@@ -2,10 +2,7 @@ |
||
2 | 2 | |
3 | 3 | use Behat\Behat\Context\Context; |
4 | 4 | use Behat\Behat\Context\SnippetAcceptingContext; |
5 | -use Behat\Gherkin\Node\PyStringNode; |
|
6 | -use Behat\Gherkin\Node\TableNode; |
|
7 | 5 | use Behat\MinkExtension\Context\RawMinkContext; |
8 | - |
|
9 | 6 | use Rezzza\SecurityBundle\Security\Firewall\SignatureConfig; |
10 | 7 | use Rezzza\SecurityBundle\Security\Firewall\SignedRequest; |
11 | 8 |