Allow configurable audience claim (#975)
This commit is contained in:
committed by
Joe Nelson
parent
4ba27d84a4
commit
3ccae4bb8b
@@ -76,7 +76,7 @@ postgrest conf refDbStructure pool worker =
|
||||
response <- case userApiRequest (configSchema conf) req body of
|
||||
Left err -> return $ apiRequestError err
|
||||
Right apiRequest -> do
|
||||
eClaims <- jwtClaims jwtSecret (toS $ iJWT apiRequest)
|
||||
eClaims <- jwtClaims jwtSecret (configJwtAudience conf) (toS $ iJWT apiRequest)
|
||||
|
||||
let authed = containsRole eClaims
|
||||
handleReq = runWithClaims conf eClaims (app dbStructure conf) apiRequest
|
||||
|
||||
Reference in New Issue
Block a user