yesod-auth 1.2.4 → 1.2.4.1
raw patch · 2 files changed
+10/−1 lines, 2 files
Files
- Yesod/Auth.hs +9/−0
- yesod-auth.cabal +1/−1
Yesod/Auth.hs view
@@ -339,6 +339,11 @@ [] -> notFound ap:_ -> apDispatch ap method pieces +-- | Similar to 'maybeAuthId', but additionally look up the value associated+-- with the user\'s database identifier to get the value in the database. This+-- assumes that you are using a Persistent database.+--+-- Since 1.1.0 maybeAuth :: ( YesodAuth master , PersistMonadBackend (b (HandlerT master IO)) ~ PersistEntityBackend val , b ~ YesodPersistBackend master@@ -388,6 +393,10 @@ requireAuthId :: YesodAuthPersist master => HandlerT master IO (AuthId master) requireAuthId = maybeAuthId >>= maybe redirectLogin return +-- | Similar to 'maybeAuth', but redirects to a login page if user is not+-- authenticated.+--+-- Since 1.1.0 requireAuth :: YesodAuthPersist master => HandlerT master IO (Entity (AuthEntity master)) requireAuth = maybeAuth >>= maybe redirectLogin return
yesod-auth.cabal view
@@ -1,5 +1,5 @@ name: yesod-auth-version: 1.2.4+version: 1.2.4.1 license: MIT license-file: LICENSE author: Michael Snoyman, Patrick Brisbin