Skip to content

Commit

Permalink
allow Numeric for iat field on OIDC tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchellhenke committed Dec 17, 2020
1 parent d129ea9 commit f00e379
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/forms/openid_connect_token_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def validate_aud_claim(payload)
def validate_iat(payload)
return true unless payload.key?('iat')
iat = payload['iat']
return true if iat.is_a?(Integer) && (iat.to_i - ISSUED_AT_LEEWAY_SECONDS) < Time.zone.now.to_i
return true if iat.is_a?(Numeric) && (iat.to_i - ISSUED_AT_LEEWAY_SECONDS) < Time.zone.now.to_i

errors.add(:client_assertion, t('openid_connect.token.errors.invalid_iat'))
end
Expand Down

0 comments on commit f00e379

Please sign in to comment.