Fix browserid.hs (closes #547)
This commit is contained in:
parent
d3e4831b38
commit
50f57a3586
@ -26,7 +26,7 @@ mkYesod "BID" [parseRoutes|
|
|||||||
getRootR :: Handler ()
|
getRootR :: Handler ()
|
||||||
getRootR = redirect $ AuthR LoginR
|
getRootR = redirect $ AuthR LoginR
|
||||||
|
|
||||||
getAfterLoginR :: Handler RepHtml
|
getAfterLoginR :: Handler Html
|
||||||
getAfterLoginR = do
|
getAfterLoginR = do
|
||||||
mauth <- maybeAuthId
|
mauth <- maybeAuthId
|
||||||
defaultLayout $ toWidget [hamlet|
|
defaultLayout $ toWidget [hamlet|
|
||||||
@ -41,13 +41,14 @@ instance YesodAuth BID where
|
|||||||
loginDest _ = AfterLoginR
|
loginDest _ = AfterLoginR
|
||||||
logoutDest _ = AuthR LoginR
|
logoutDest _ = AuthR LoginR
|
||||||
getAuthId = return . Just . credsIdent
|
getAuthId = return . Just . credsIdent
|
||||||
authPlugins _ = [authBrowserId]
|
authPlugins _ = [authBrowserId def]
|
||||||
authHttpManager = httpManager
|
authHttpManager = httpManager
|
||||||
|
maybeAuthId = lookupSession credsKey
|
||||||
|
|
||||||
instance RenderMessage BID FormMessage where
|
instance RenderMessage BID FormMessage where
|
||||||
renderMessage _ _ = defaultFormMessage
|
renderMessage _ _ = defaultFormMessage
|
||||||
|
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
main = do
|
main = do
|
||||||
m <- newManager def
|
m <- newManager conduitManagerSettings
|
||||||
toWaiApp (BID m) >>= run 3000 . logStdoutDev
|
toWaiApp (BID m) >>= run 3000 . logStdoutDev
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user