Skip to content

Commit 3458c32

Browse files
committed
Tweaks and rewords
1 parent c0e22b9 commit 3458c32

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

routing.rst

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2622,12 +2622,10 @@ Signing URIs
26222622

26232623
A signed URI is an URI that includes a hash value that depends on the contents of
26242624
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.
26262626

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::
26312629

26322630
// src/Service/SomeService.php
26332631
namespace App\Service;
@@ -2656,8 +2654,8 @@ which you can inject in your services or controllers::
26562654
$uriSignatureIsValid = $this->uriSigner->check($signedUrl);
26572655
// $uriSignatureIsValid = true
26582656

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:
26612659
$uriSignatureIsValid = $this->uriSigner->checkRequest($request);
26622660
}
26632661
}

0 commit comments

Comments
 (0)