Approot used in rpxnow login
This commit is contained in:
parent
12a43ef90b
commit
aff7722e12
1
TODO
1
TODO
@ -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
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user