File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -67,13 +67,11 @@ instance JSON.FromJSON ValidAud where
6767 parseJSON = JSON. genericParseJSON JSON. defaultOptions { JSON. sumEncoding = JSON. UntaggedValue }
6868
6969checkForErrors :: (Applicative m , Monoid (m JwtClaimsError )) => UTCTime -> (Text -> Bool ) -> JSON. Object -> m JwtClaimsError
70- checkForErrors time audMatches = mconcat
71- [
72- claim " exp" ExpClaimNotNumber $ inThePast JWTExpired
73- , claim " nbf" NbfClaimNotNumber $ inTheFuture JWTNotYetValid
74- , claim " iat" IatClaimNotNumber $ inTheFuture JWTIssuedAtFuture
75- , claim " aud" AudClaimNotStringOrURIOrArray $ checkValue (not . validAud) JWTNotInAudience
76- ]
70+ checkForErrors time audMatches =
71+ claim " exp" ExpClaimNotNumber (inThePast JWTExpired )
72+ <> claim " nbf" NbfClaimNotNumber (inTheFuture JWTNotYetValid )
73+ <> claim " iat" IatClaimNotNumber (inTheFuture JWTIssuedAtFuture )
74+ <> claim " aud" AudClaimNotStringOrURIOrArray (checkValue (not . validAud) JWTNotInAudience )
7775 where
7876 allowedSkewSeconds = 30 :: Int64
7977 sciToInt = fromMaybe 0 . Sci. toBoundedInteger
You can’t perform that action at this time.
0 commit comments