Skip to content

Commit f00e379

Browse files
author
Mitchell Henke
committed
allow Numeric for iat field on OIDC tokens
1 parent d129ea9 commit f00e379

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/forms/openid_connect_token_form.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def validate_aud_claim(payload)
128128
def validate_iat(payload)
129129
return true unless payload.key?('iat')
130130
iat = payload['iat']
131-
return true if iat.is_a?(Integer) && (iat.to_i - ISSUED_AT_LEEWAY_SECONDS) < Time.zone.now.to_i
131+
return true if iat.is_a?(Numeric) && (iat.to_i - ISSUED_AT_LEEWAY_SECONDS) < Time.zone.now.to_i
132132

133133
errors.add(:client_assertion, t('openid_connect.token.errors.invalid_iat'))
134134
end

0 commit comments

Comments
 (0)