@@ -2622,12 +2622,10 @@ Signing URIs
2622
2622
2623
2623
A signed URI is an URI that includes a hash value that depends on the contents of
2624
2624
the URI. This way, you can later check the integrity of the signed URI by
2625
- recomputing its hash value and comparing it with the original hash.
2625
+ recomputing its hash value and comparing it with the hash included in the URI .
2626
2626
2627
- Symfony provides a utility to sign URIs, no matter if you generated them yourself
2628
- with the methods explained above or if they were given to you. The utility is
2629
- implemented in the :class: `Symfony\\ Component\\ HttpKernel\\ UriSigner ` service,
2630
- which you can inject in your services or controllers::
2627
+ Symfony provides a utility to sign URIs via the :class: `Symfony\\ Component\\ HttpKernel\\ UriSigner `
2628
+ service, which you can inject in your services or controllers::
2631
2629
2632
2630
// src/Service/SomeService.php
2633
2631
namespace App\Service;
@@ -2656,8 +2654,8 @@ which you can inject in your services or controllers::
2656
2654
$uriSignatureIsValid = $this->uriSigner->check($signedUrl);
2657
2655
// $uriSignatureIsValid = true
2658
2656
2659
- // if you have access to the current Request object, you can pass
2660
- // the Request object to this other method :
2657
+ // if you have access to the current Request object, you can use this
2658
+ // other method to pass the entire Request object instead of the URI :
2661
2659
$uriSignatureIsValid = $this->uriSigner->checkRequest($request);
2662
2660
}
2663
2661
}
0 commit comments