From ab49c1e0faa1bbe4f149c2e891e6b2f7fea19bb6 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Sun, 4 Oct 2009 20:25:20 +0200 Subject: [PATCH] Rpxnow supporting GET and POST --- Web/Restful/Helpers/Auth.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Web/Restful/Helpers/Auth.hs b/Web/Restful/Helpers/Auth.hs index 50cb23e7..14b12067 100644 --- a/Web/Restful/Helpers/Auth.hs +++ b/Web/Restful/Helpers/Auth.hs @@ -57,6 +57,8 @@ instance ResourceName AuthResource (Maybe RpxnowApiKey) where getHandler _ Openid Get = authOpenidForm getHandler _ OpenidForward Get = authOpenidForward getHandler _ OpenidComplete Get = authOpenidComplete + -- two different versions of RPX protocol apparently... + getHandler (Just key) LoginRpxnow Get = rpxnowLogin key getHandler (Just key) LoginRpxnow Post = rpxnowLogin key getHandler _ _ _ = notFound @@ -132,8 +134,8 @@ authOpenidComplete = do data RpxnowRequest = RpxnowRequest String (Maybe String) instance Request RpxnowRequest where parseRequest = do - token <- postParam "token" - dest <- postParam "dest" + token <- anyParam "token" + dest <- anyParam "dest" return $! RpxnowRequest token $ chopHash `fmap` dest chopHash :: String -> String