Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[HttpFoundation]#[IsSignatureValid] attribute#60395

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
santysisi wants to merge1 commit intosymfony:7.4
base:7.4
Choose a base branch
Loading
fromsantysisi:feature/verify-signature-attribute

Conversation

santysisi
Copy link
Contributor

@santysisisantysisi commentedMay 9, 2025
edited
Loading

QA
Branch?7.4
Bug fix?no
New feature?yes
Deprecations?no
IssuesFeature#60189
LicenseMIT

✨ New Feature:#[IsSignatureValid] Attribute

This attribute simplifies signature verification by applying it declaratively at the controller level.

✅ Usage Examples

#[IsSignatureValid]// Default behavior: returns 404 on failurepublicfunction someAction():Response
#[IsSignatureValid(validationFailedStatusCode:401)]// Customize failure status codepublicfunction someAction():Response

🔥 Advanced Usage (with#60102)

When throw: true is passed, exceptions are thrown instead of returning responses directly:

#[IsSignatureValid(throw:true)]publicfunction someAction():Response

@santysisisantysisi requested a review fromchalasr as acode ownerMay 9, 2025 21:24
@carsonbotcarsonbot added this to the7.3 milestoneMay 9, 2025
@santysisisantysisiforce-pushed thefeature/verify-signature-attribute branch 5 times, most recently from4730169 toc72ef83CompareMay 9, 2025 22:27
@santysisi
Copy link
ContributorAuthor

santysisi commentedMay 9, 2025
edited
Loading

Hi 👋
I'll update this version7.3 to7.4 once the new minor dev version is released.

Edit: I updated thisversion to 7.3 because I need thismethod fromUriSigner.

@kbond
Copy link
Member

This is looking great@santysisi! I'll give it a more thorough review after 7.3 is released.

santysisi reacted with heart emoji

@santysisisantysisiforce-pushed thefeature/verify-signature-attribute branch fromc72ef83 to85320cfCompareMay 18, 2025 03:00
@santysisi
Copy link
ContributorAuthor

We could also consider adding an extra argument to the attribute calledmethods to restrict the validation to specific HTTP methods. This would align with the current behavior of theIsCsrfTokenValid attribute.

@fabpotfabpot modified the milestones:7.3,7.4May 26, 2025
@santysisisantysisiforce-pushed thefeature/verify-signature-attribute branch from85320cf toc000b69CompareMay 29, 2025 23:01
@santysisi
Copy link
ContributorAuthor

We could also consider adding an extra argument to the attribute calledmethods to restrict the validation to specific HTTP methods. This would align with the current behavior of theIsCsrfTokenValid attribute.

Hi 👋 I'll update this version7.3 to7.4 once the new minor dev version is released.

Edit: I updated thisversion to 7.3 because I need thismethod fromUriSigner.

ready these 2 changes 🚀

Copy link
Member

@kbondkbond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This looks really great, nice work@santysisi!

santysisi and OskarStark reacted with heart emojisantysisi and OskarStark reacted with rocket emoji
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@94noni94noni94noni left review comments

@kbondkbondkbond approved these changes

@chalasrchalasrAwaiting requested review from chalasrchalasr is a code owner

Assignees
No one assigned
Projects
None yet
Milestone
7.4
Development

Successfully merging this pull request may close these issues.

6 participants
@santysisi@kbond@94noni@chalasr@fabpot@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp