-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Closed
Labels
Description
Description
The ability to add a #[VerifySignature] above a controller to automatically verify it's signature before executing.
Example
#[VerifySignature] // default behaviour (400/404?)
public function someAction(): Response
#[VerifySignature(statusCode: 401)] // customize the status code
public function someAction(): ResponseWith #60102, the following behaviour could be added:
#[VerifySignature(throw: true)]
public function someAction(): ResponseThis would throw a UnsignedUriException|UnverifiedSignedUriException|ExpiredSignedUriException to be caught/handled by an exception listener or converted with framework.exceptions:
framework:
exceptions:
Symfony\Component\HttpFoundation\Exception\UnsignedUriException:
status_code: 404
Symfony\Component\HttpFoundation\Exception\UnverifiedSignedUriException:
status_code: 400
Symfony\Component\HttpFoundation\Exception\ExpiredSignedUriException:
status_code: 410kaznovac, norkunas, smnandre, arczinosek, Zuruuh and 4 more