yesod-auth-account-fork 2.0.1 → 2.0.2
raw patch · 3 files changed
+17/−12 lines, 3 filesdep +yesod-auth-account-forkdep −yesod-auth-accountPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependencies added: yesod-auth-account-fork
Dependencies removed: yesod-auth-account
API changes (from Hackage documentation)
- Yesod.Auth.Account: class AccountSendEmail master where sendVerifyEmail uname email url = ((monadLoggerLog (Loc "src/Yesod/Auth/Account.hs" "yesod-auth-account-fork-2.0.1" "Yesod.Auth.Account" (803, 11) (803, 18)) (pack "") LevelInfo) . (id :: Text -> Text)) $ concat ["Verification email for ", uname, " (", email, "): ", url] sendNewPasswordEmail uname email url = ((monadLoggerLog (Loc "src/Yesod/Auth/Account.hs" "yesod-auth-account-fork-2.0.1" "Yesod.Auth.Account" (814, 11) (814, 18)) (pack "") LevelInfo) . (id :: Text -> Text)) $ concat ["Reset password email for ", uname, " (", email, "): ", url]
+ Yesod.Auth.Account: class AccountSendEmail master where sendVerifyEmail uname email url = ((monadLoggerLog (Loc "src/Yesod/Auth/Account.hs" "yesod-auth-account-fork-2.0.2" "Yesod.Auth.Account" (803, 11) (803, 18)) (pack "") LevelInfo) . (id :: Text -> Text)) $ concat ["Verification email for ", uname, " (", email, "): ", url] sendNewPasswordEmail uname email url = ((monadLoggerLog (Loc "src/Yesod/Auth/Account.hs" "yesod-auth-account-fork-2.0.2" "Yesod.Auth.Account" (814, 11) (814, 18)) (pack "") LevelInfo) . (id :: Text -> Text)) $ concat ["Reset password email for ", uname, " (", email, "): ", url]
Files
tests/ChangePasswordLogged.hs view
@@ -6,6 +6,13 @@ import Foundation import qualified Data.Text as T +redirectCode :: Int+#if MIN_VERSION_yesod_test(1,4,0)+redirectCode = 303+#else+redirectCode = 302+#endif+ -- In 9f379bc219bd1fdf008e2c179b03e98a05b36401 (which went into yesod-form-1.3.9) -- the numbering of fields was changed. We normally wouldn't care because fields -- can be set via 'byLabel', but hidden fields have no label so we must use the id@@ -31,7 +38,7 @@ byLabel "Password" "xxx" byLabel "Confirm" "xxx" - statusIs 302+ statusIs redirectCode get' "/" statusIs 200 bodyContains "A confirmation e-mail has been sent to tst@example.com"@@ -52,7 +59,7 @@ post'"/auth/page/account/resendverifyemail" $ do addNonce addPostParam f1 "aaa" -- username is also a hidden field- statusIs 302+ statusIs redirectCode get' "/" bodyContains "A confirmation e-mail has been sent to tst@example.com" @@ -63,13 +70,13 @@ -- verify email get' verify'- statusIs 302+ statusIs redirectCode get' "/" statusIs 200 bodyContains "You are logged in as aaa" post $ AuthR LogoutR- statusIs 302+ statusIs redirectCode get' "/" statusIs 200 bodyContains "Please visit the <a href=\"/auth/login\">Login page"@@ -79,7 +86,7 @@ post'"/auth/page/account/login" $ do byLabel "Username" "aaa" byLabel "Password" "xxx"- statusIs 302+ statusIs redirectCode get' "/" bodyContains "You are logged in as aaa" @@ -92,7 +99,7 @@ byLabel "New password" "www" byLabel "Confirm" "www" addPostParam f1 "aaa"- statusIs 302+ statusIs redirectCode get' "/" statusIs 200 bodyContains "Password updated"@@ -105,7 +112,7 @@ post'"/auth/page/account/login" $ do byLabel "Username" "aaa" byLabel "Password" "www"- statusIs 302+ statusIs redirectCode get' "/" statusIs 200 bodyContains "You are logged in as aaa"@@ -117,5 +124,3 @@ yit "cannot change password while logged out" $ do get' "/auth/page/account/newpasswordlgd" statusIs 403--
tests/NewAccount.hs view
@@ -145,7 +145,7 @@ post'"/auth/page/account/login" $ do byLabel "Username" "test@example.com" byLabel "Password" "xxx"- statusIs 302+ statusIs redirectCode get' "/" bodyContains "You are logged in as abc"
yesod-auth-account-fork.cabal view
@@ -1,5 +1,5 @@ name: yesod-auth-account-fork-version: 2.0.1+version: 2.0.2 cabal-version: >= 1.8 build-type: Simple synopsis: An account authentication plugin for Yesod@@ -81,4 +81,4 @@ , yesod >= 1.2 && < 1.5 , yesod-test >= 1.2.1.5 , yesod-auth >= 1.3.3 && < 1.5- , yesod-auth-account+ , yesod-auth-account-fork