Fix #1016
This commit is contained in:
@@ -39,7 +39,7 @@ data JWTAttempt = JWTInvalid JWTError
|
||||
of JWT claims.
|
||||
-}
|
||||
jwtClaims :: Maybe JWK -> Maybe StringOrURI -> LByteString -> IO JWTAttempt
|
||||
jwtClaims _ Nothing "" = return $ JWTClaims M.empty
|
||||
jwtClaims _ _ "" = return $ JWTClaims M.empty
|
||||
jwtClaims secret audience payload =
|
||||
case secret of
|
||||
Nothing -> return JWTMissingSecret
|
||||
|
||||
@@ -151,6 +151,7 @@ readOptions = do
|
||||
Nothing -> pure Nothing -- no audience in config file
|
||||
Just aud -> case preview stringOrUri (aud :: String) of
|
||||
Nothing -> fail "Invalid Jwt audience. Check your configuration."
|
||||
(Just "") -> pure Nothing
|
||||
aud' -> pure aud'
|
||||
|
||||
coerceInt :: (Read i, Integral i) => Value -> Maybe i
|
||||
|
||||
Reference in New Issue
Block a user