Skip to content

Commit

Permalink
Change include? to key? for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
anakinj committed Aug 4, 2024
1 parent 9710bc9 commit 877c015
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/jwt/claims/required.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def initialize(required_claims:)

def verify!(context:, **_args)
required_claims.each do |required_claim|
next if context.payload.is_a?(Hash) && context.payload.include?(required_claim)
next if context.payload.is_a?(Hash) && context.payload.key?(required_claim)

raise JWT::MissingRequiredClaim, "Missing required claim #{required_claim}"
end
Expand Down

0 comments on commit 877c015

Please sign in to comment.