yesod-auth 1.2.2 → 1.2.2.1
raw patch · 1 files changed
+2/−2 lines, 1 filesdep ~shakespeare-jsPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: shakespeare-js
API changes (from Hackage documentation)
- Yesod.Auth.Email: class (YesodAuth site, PathPiece (AuthEmailId site)) => YesodAuthEmail site where type family AuthEmailId site randomKey _ = do { stdgen <- newStdGen; return $ pack $ fst $ randomString 10 stdgen } needOldPassword aid' = do { mkey <- lookupSession loginLinkKey; case mkey >>= readMay . unpack of { Just (aidT, time) | Just aid <- fromPathPiece aidT, toPathPiece (aid `asTypeOf` aid') == toPathPiece aid' -> do { now <- liftIO getCurrentTime; return $ addUTCTime (60 * 30) time <= now } _ -> return True } } checkPasswordSecurity _ x | length x >= 3 = return $ Right () | otherwise = return $ Left "Password must be at least three characters" confirmationEmailSentResponse identifier = defaultLayout $ do { setTitleI ConfirmationEmailSentTitle; do { (asWidgetT . toWidget) ((preEscapedText . pack) "<p>"); ((liftM (toHtml .) getMessageRender) >>= (\ urender_aJI3 -> (asWidgetT . toWidget) (urender_aJI3 (ConfirmationEmailSent identifier)))); (asWidgetT . toWidget) ((preEscapedText . pack) "</p>") } }
+ Yesod.Auth.Email: class (YesodAuth site, PathPiece (AuthEmailId site)) => YesodAuthEmail site where type family AuthEmailId site randomKey _ = do { stdgen <- newStdGen; return $ pack $ fst $ randomString 10 stdgen } needOldPassword aid' = do { mkey <- lookupSession loginLinkKey; case mkey >>= readMay . unpack of { Just (aidT, time) | Just aid <- fromPathPiece aidT, toPathPiece (aid `asTypeOf` aid') == toPathPiece aid' -> do { now <- liftIO getCurrentTime; return $ addUTCTime (60 * 30) time <= now } _ -> return True } } checkPasswordSecurity _ x | length x >= 3 = return $ Right () | otherwise = return $ Left "Password must be at least three characters" confirmationEmailSentResponse identifier = defaultLayout $ do { setTitleI ConfirmationEmailSentTitle; do { (asWidgetT . toWidget) ((preEscapedText . pack) "<p>"); ((liftM (toHtml .) getMessageRender) >>= (\ urender_aJI5 -> (asWidgetT . toWidget) (urender_aJI5 (ConfirmationEmailSent identifier)))); (asWidgetT . toWidget) ((preEscapedText . pack) "</p>") } }
Files
- yesod-auth.cabal +2/−2
yesod-auth.cabal view
@@ -1,5 +1,5 @@ name: yesod-auth-version: 1.2.2+version: 1.2.2.1 license: MIT license-file: LICENSE author: Michael Snoyman, Patrick Brisbin@@ -29,7 +29,7 @@ , yesod-persistent >= 1.2 , hamlet >= 1.1 && < 1.2 , shakespeare-css >= 1.0 && < 1.1- , shakespeare-js >= 1.0.2 && < 1.2+ , shakespeare-js >= 1.0.2 && < 1.3 , containers , unordered-containers , yesod-form >= 1.3 && < 1.4