Approot used in rpxnow login

This commit is contained in:
Michael Snoyman 2010-01-06 21:27:56 +02:00
parent 12a43ef90b
commit aff7722e12
2 changed files with 4 additions and 2 deletions

1
TODO
View File

@ -3,3 +3,4 @@ Cleanup Parameter stuff. Own module? Interface with formlets?
Authentication via e-mail address built in. (eaut.org) Authentication via e-mail address built in. (eaut.org)
OpenID 2 stuff (for direct Google login). OpenID 2 stuff (for direct Google login).
Languages (read languages header, set language cookie) Languages (read languages header, set language cookie)
Approot and trailing slash missing

View File

@ -129,6 +129,7 @@ authOpenidComplete = do
rpxnowLogin :: YesodAuth y => Handler y HtmlObject rpxnowLogin :: YesodAuth y => Handler y HtmlObject
rpxnowLogin = do rpxnowLogin = do
ay <- getYesod ay <- getYesod
let (Approot ar) = approot ay
apiKey <- case rpxnowApiKey ay of apiKey <- case rpxnowApiKey ay of
Just x -> return x Just x -> return x
Nothing -> notFound Nothing -> notFound
@ -138,8 +139,8 @@ rpxnowLogin = do
Nothing -> runRequest $ getParam "dest" Nothing -> runRequest $ getParam "dest"
Just d -> return d Just d -> return d
let dest = case dest' of let dest = case dest' of
Nothing -> "/" Nothing -> ar
Just "" -> "/" Just "" -> ar
Just ('#':rest) -> rest Just ('#':rest) -> rest
Just s -> s Just s -> s
ident <- Rpxnow.authenticate apiKey token ident <- Rpxnow.authenticate apiKey token