diff --git a/CHANGELOG.md b/CHANGELOG.md index 73eb551..a5aa1b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] -## [0.1.3.9] - 2021-07-015 +## [0.1.3.10] - 2021-08-03 +### Added +- Create OIDC config with provided tls manager. + +## [0.1.3.9] - 2021-07-15 ### Changed - Pass access token to handlers. diff --git a/src/Web/Template/Servant/Auth.hs b/src/Web/Template/Servant/Auth.hs index 7866acf..b276acc 100644 --- a/src/Web/Template/Servant/Auth.hs +++ b/src/Web/Template/Servant/Auth.hs @@ -9,6 +9,7 @@ module Web.Template.Servant.Auth , UserId (..) , OIDCConfig (..) , defaultOIDCCfg + , oidcCfgWithManager , OIDCUser (..) , Permit ) where @@ -152,10 +153,12 @@ data OIDCConfig } defaultOIDCCfg :: MonadIO m => m OIDCConfig -defaultOIDCCfg = do +defaultOIDCCfg = newTlsManager >>= oidcCfgWithManager + +oidcCfgWithManager :: MonadIO m => Manager -> m OIDCConfig +oidcCfgWithManager mgr = do discoCache <- liftIO $ Cache.newCache $ Just 0 keyCache <- liftIO $ Cache.newCache $ Just 0 - mgr <- newTlsManager return $ OIDCConfig { oidcManager = mgr , oidcDiscoCache = discoCache diff --git a/web-template.cabal b/web-template.cabal index cdb88cd..e85cedc 100644 --- a/web-template.cabal +++ b/web-template.cabal @@ -1,5 +1,5 @@ name: web-template -version: 0.1.3.9 +version: 0.1.3.10 synopsis: Web template description: Web template includes: