Skip to content

Commit 2413c6e

Browse files
committed
Removes 'iat' from required claims
1 parent a29a848 commit 2413c6e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

app/domain/authentication/authn_jwt/v2/strategy.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,15 @@ def callback(request_body:, parameters: nil)
8383
raise Errors::Authentication::AuthnJwt::MissingToken
8484
end
8585

86+
# TODO: Should `iat` be required?
87+
#
8688
# The check for audience "should" go away if we force audience to be
8789
# required
8890
manditory_claims = if @authenticator.audience.present?
89-
%w[exp aud iat]
91+
%w[exp aud]
9092
else
9193
# Lots of tests pass because we don't set audience :( ...
92-
%w[exp iat]
94+
%w[exp]
9395
end
9496
if (missing_claim = (manditory_claims - token.keys).first)
9597
raise Errors::Authentication::AuthnJwt::MissingMandatoryClaim, missing_claim

0 commit comments

Comments
 (0)