Fix OpenID 404 (thanks Blake)

This commit is contained in:
Michael Snoyman 2011-03-04 11:00:01 +02:00
parent 22fbc23442
commit 5cedddb364
2 changed files with 6 additions and 4 deletions

View File

@ -26,7 +26,7 @@ authOpenId :: YesodAuth m => AuthPlugin m
authOpenId =
AuthPlugin "openid" dispatch login
where
complete = PluginR "openid" ["complete", ""]
complete = PluginR "openid" ["complete"]
name = "openid_identifier"
login tm = do
ident <- lift newIdent
@ -71,10 +71,12 @@ authOpenId =
toMaster <- getRouteToMaster
setMessage $ messageNoOpenID y
redirect RedirectTemporary $ toMaster LoginR
dispatch "GET" ["complete", ""] = do
dispatch "GET" ["complete", ""] = dispatch "GET" ["complete"] -- compatibility issues
dispatch "GET" ["complete"] = do
rr <- getRequest
completeHelper $ reqGetParams rr
dispatch "POST" ["complete", ""] = do
dispatch "POST" ["complete", ""] = dispatch "POST" ["complete"] -- compatibility issues
dispatch "POST" ["complete"] = do
(posts, _) <- runRequestBody
completeHelper posts
dispatch _ _ = notFound

View File

@ -1,5 +1,5 @@
name: yesod-auth
version: 0.3.0
version: 0.3.0.1
license: BSD3
license-file: LICENSE
author: Michael Snoyman, Patrick Brisbin