From 56d4b8c3ee64fb7abef59111f576172548a94e2d Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Thu, 26 Mar 2015 14:52:36 +0200 Subject: [PATCH] Version bump --- yesod-core/ChangeLog.md | 4 ++++ yesod-core/Yesod/Core/Handler.hs | 4 ++++ yesod-core/yesod-core.cabal | 4 ++-- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/yesod-core/ChangeLog.md b/yesod-core/ChangeLog.md index b065522d..30b30cfe 100644 --- a/yesod-core/ChangeLog.md +++ b/yesod-core/ChangeLog.md @@ -1,3 +1,7 @@ +## 1.4.9 + +* Add simple authentication helpers [#962](https://github.com/yesodweb/yesod/pull/962) + ## 1.4.8.3 * Use 307 redirect for cleaning paths and non-GET requests [#951](https://github.com/yesodweb/yesod/issues/951) diff --git a/yesod-core/Yesod/Core/Handler.hs b/yesod-core/Yesod/Core/Handler.hs index 202c7666..19f41521 100644 --- a/yesod-core/Yesod/Core/Handler.hs +++ b/yesod-core/Yesod/Core/Handler.hs @@ -979,6 +979,8 @@ lookupHeaders key = do -- | Lookup basic authentication data from __Authorization__ header of -- request. Returns user name and password +-- +-- Since 1.4.9 lookupBasicAuth :: (MonadHandler m) => m (Maybe (Text, Text)) lookupBasicAuth = fmap (>>= getBA) (lookupHeader "Authorization") @@ -989,6 +991,8 @@ lookupBasicAuth = fmap (>>= getBA) -- | Lookup bearer authentication datafrom __Authorization__ header of -- request. Returns bearer token value +-- +-- Since 1.4.9 lookupBearerAuth :: (MonadHandler m) => m (Maybe Text) lookupBearerAuth = fmap (>>= getBR) (lookupHeader "Authorization") diff --git a/yesod-core/yesod-core.cabal b/yesod-core/yesod-core.cabal index 0d32476f..365a6362 100644 --- a/yesod-core/yesod-core.cabal +++ b/yesod-core/yesod-core.cabal @@ -1,5 +1,5 @@ name: yesod-core -version: 1.4.8.3 +version: 1.4.9 license: MIT license-file: LICENSE author: Michael Snoyman @@ -25,7 +25,7 @@ library build-depends: base >= 4.3 && < 5 , time >= 1.1.4 , wai >= 3.0 - , wai-extra >= 3.0 + , wai-extra >= 3.0.5 , bytestring >= 0.9.1.4 , text >= 0.7 , template-haskell