Allow configurable audience claim (#975)
This commit is contained in:
committed by
Joe Nelson
parent
4ba27d84a4
commit
3ccae4bb8b
+8
-1
@@ -68,7 +68,7 @@ _baseCfg :: AppConfig
|
||||
_baseCfg = -- Connection Settings
|
||||
AppConfig mempty "postgrest_test_anonymous" Nothing "test" "localhost" 3000
|
||||
-- Jwt settings
|
||||
(Just $ encodeUtf8 "reallyreallyreallyreallyverysafe") False
|
||||
(Just $ encodeUtf8 "reallyreallyreallyreallyverysafe") False ""
|
||||
-- Connection Modifiers
|
||||
10 Nothing (Just "test.switch_role")
|
||||
-- Debug Settings
|
||||
@@ -95,6 +95,13 @@ testCfgBinaryJWT testDbConn = (testCfg testDbConn) {
|
||||
"cmVhbGx5cmVhbGx5cmVhbGx5cmVhbGx5dmVyeXNhZmU="
|
||||
}
|
||||
|
||||
testCfgAudienceJWT :: Text -> AppConfig
|
||||
testCfgAudienceJWT testDbConn = (testCfg testDbConn) {
|
||||
configJwtSecret = Just . B64.decodeLenient $
|
||||
"cmVhbGx5cmVhbGx5cmVhbGx5cmVhbGx5dmVyeXNhZmU=",
|
||||
configJwtAudience = "youraudience"
|
||||
}
|
||||
|
||||
testCfgAsymJWK :: Text -> AppConfig
|
||||
testCfgAsymJWK testDbConn = (testCfg testDbConn) {
|
||||
configJwtSecret = Just $ encodeUtf8
|
||||
|
||||
Reference in New Issue
Block a user