From 382a5402c829e2397c3dfaeac21b87f20efff986 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Tue, 17 Jun 2014 08:04:28 +0300 Subject: [PATCH] yesod-auth 1.3, authenticate-oauth 1.5 --- yesod-auth-oauth/Yesod/Auth/OAuth.hs | 4 +++- yesod-auth-oauth/yesod-auth-oauth.cabal | 10 +++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/yesod-auth-oauth/Yesod/Auth/OAuth.hs b/yesod-auth-oauth/Yesod/Auth/OAuth.hs index fa7f1c76..4839a356 100644 --- a/yesod-auth-oauth/Yesod/Auth/OAuth.hs +++ b/yesod-auth-oauth/Yesod/Auth/OAuth.hs @@ -43,6 +43,7 @@ authOAuth oauth mkCreds = AuthPlugin name dispatch login url = PluginR name [] lookupTokenSecret = bsToText . fromMaybe "" . lookup "oauth_token_secret" . unCredential oauthSessionName = "__oauth_token_secret" + dispatch "GET" ["forward"] = do render <- lift getUrlRender tm <- getRouteToParent @@ -72,8 +73,9 @@ authOAuth oauth mkCreds = AuthPlugin name dispatch login master <- getYesod accTok <- getAccessToken oauth reqTok (authHttpManager master) creds <- liftIO $ mkCreds accTok - setCreds True creds + setCredsRedirect creds dispatch _ _ = notFound + login tm = do render <- getUrlRender let oaUrl = render $ tm $ oauthUrl name diff --git a/yesod-auth-oauth/yesod-auth-oauth.cabal b/yesod-auth-oauth/yesod-auth-oauth.cabal index a3e89f30..dff15167 100644 --- a/yesod-auth-oauth/yesod-auth-oauth.cabal +++ b/yesod-auth-oauth/yesod-auth-oauth.cabal @@ -1,5 +1,5 @@ name: yesod-auth-oauth -version: 1.2.0 +version: 1.3.0 license: BSD3 license-file: LICENSE author: Hiromi Ishii @@ -20,13 +20,13 @@ library cpp-options: -DGHC7 else build-depends: base >= 4 && < 4.3 - build-depends: authenticate-oauth >= 1.4 && < 1.5 + build-depends: authenticate-oauth >= 1.5 && < 1.6 , bytestring >= 0.9.1.4 , yesod-core >= 1.2 && < 1.3 - , yesod-auth >= 1.2 && < 1.3 - , text >= 0.7 && < 1.1 + , yesod-auth >= 1.3 && < 1.4 + , text >= 0.7 , yesod-form >= 1.3 && < 1.4 - , transformers >= 0.2.2 && < 0.4 + , transformers >= 0.2.2 && < 0.5 , lifted-base >= 0.2 && < 0.3 exposed-modules: Yesod.Auth.OAuth ghc-options: -Wall