Skip to content

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

Merged
lcobucci merged 4 commits into
lcobucci:5.3.xfrom
freebuu:has-claim-constraint
Apr 11, 2024
Merged

Add constraint to verify the existence of a custom claim#1053
lcobucci merged 4 commits into
lcobucci:5.3.xfrom
freebuu:has-claim-constraint

Conversation

@freebuu

@freebuu freebuu commented Apr 2, 2024

Copy link
Copy Markdown
Contributor

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.)

Comment thread tests/Validation/Constraint/HasClaimTest.php
Comment thread src/Validation/Constraint/HasClaim.php
@Ocramius Ocramius added this to the 5.3.0 milestone Apr 2, 2024
Comment thread src/Validation/Constraint/HasClaim.php

@lcobucci lcobucci left a comment

Copy link
Copy Markdown
Owner

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
@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.

4 participants