Skip to content

Commit 51c8203

Browse files
authored
Version: 0.1.3.10: create OIDCConfig with custom manager (#29)
1 parent c84776f commit 51c8203

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9-
## [0.1.3.9] - 2021-07-015
9+
## [0.1.3.10] - 2021-08-03
10+
### Added
11+
- Create OIDC config with provided tls manager.
12+
13+
## [0.1.3.9] - 2021-07-15
1014
### Changed
1115
- Pass access token to handlers.
1216

src/Web/Template/Servant/Auth.hs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ module Web.Template.Servant.Auth
99
, UserId (..)
1010
, OIDCConfig (..)
1111
, defaultOIDCCfg
12+
, oidcCfgWithManager
1213
, OIDCUser (..)
1314
, Permit
1415
) where
@@ -152,10 +153,12 @@ data OIDCConfig
152153
}
153154

154155
defaultOIDCCfg :: MonadIO m => m OIDCConfig
155-
defaultOIDCCfg = do
156+
defaultOIDCCfg = newTlsManager >>= oidcCfgWithManager
157+
158+
oidcCfgWithManager :: MonadIO m => Manager -> m OIDCConfig
159+
oidcCfgWithManager mgr = do
156160
discoCache <- liftIO $ Cache.newCache $ Just 0
157161
keyCache <- liftIO $ Cache.newCache $ Just 0
158-
mgr <- newTlsManager
159162
return $ OIDCConfig
160163
{ oidcManager = mgr
161164
, oidcDiscoCache = discoCache

web-template.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: web-template
2-
version: 0.1.3.9
2+
version: 0.1.3.10
33
synopsis: Web template
44
description:
55
Web template includes:

0 commit comments

Comments
 (0)