Add a method to verify if a claim is present, regardless of its value #360
Labels
feature request
A feature has been asked for or suggested by the community
Milestone
Describe the problem you'd like to have solved
I'd like to be able to verify that certain claims are present on a JWT, but I don't want have to limit its value.
Describe the ideal solution
A
Verification
method along the lines ofwithClaim(String name)
which simply ensures the claim is present. AdditionallywithClaim(String name, Type type)
which validates the claim is present and assignable totype
would be nice.Alternatives and current work-arounds
I don't have any work around currently, especially since the implementing class is
final
. Alternative names for the proposed method could behasClaim
,isPresent
,requireClaim
, etc, might make it clearer that the method is different to the otherwithClaim
s. Not sure if this is preferred vs sticking with a consistent name.The text was updated successfully, but these errors were encountered: