Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add constraint to verify the existence of a custom claim #1053

Merged
merged 4 commits into from
Apr 11, 2024

Conversation

freebuu
Copy link
Contributor

@freebuu freebuu commented Apr 2, 2024

Hello!

I want to add a HasClaim constraint that validates a presence of claim in token.

It useful for custom claims with non stable values (device_id etc.)

tests/Validation/Constraint/HasClaimTest.php Show resolved Hide resolved
src/Validation/Constraint/HasClaim.php Show resolved Hide resolved
@Ocramius Ocramius added this to the 5.3.0 milestone Apr 2, 2024
src/Validation/Constraint/HasClaim.php Show resolved Hide resolved
Copy link
Owner

@lcobucci lcobucci left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution 👍

@lcobucci lcobucci dismissed stale reviews from Slamdunk and Ocramius April 11, 2024 23:07

Updates applied

@lcobucci lcobucci merged commit 08071d8 into lcobucci:5.3.x Apr 11, 2024
21 checks passed
@lcobucci lcobucci changed the title HasClaim constraint Add constraint to verify the existence of a custom claim Apr 11, 2024
@lcobucci lcobucci self-assigned this Apr 11, 2024
@freebuu freebuu deleted the has-claim-constraint branch April 12, 2024 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants