diff --git a/yesod-auth-oauth/Yesod/Auth/OAuth.hs b/yesod-auth-oauth/Yesod/Auth/OAuth.hs index 3949edc5..382cde94 100644 --- a/yesod-auth-oauth/Yesod/Auth/OAuth.hs +++ b/yesod-auth-oauth/Yesod/Auth/OAuth.hs @@ -14,17 +14,16 @@ import Yesod.Auth import Yesod.Form import Yesod.Handler import Yesod.Widget -import Text.Hamlet (shamlet) import Web.Authenticate.OAuth import Data.Maybe import Control.Arrow ((***)) +import Control.Monad.IO.Class import Data.Text (Text) import qualified Data.Text as T import Data.Text.Encoding (encodeUtf8, decodeUtf8With) import Data.Text.Encoding.Error (lenientDecode) import Data.ByteString (ByteString) import Control.Applicative ((<$>), (<*>)) -import Data.Conduit oauthUrl :: Text -> AuthRoute oauthUrl name = PluginR name ["forward"] @@ -69,14 +68,14 @@ authOAuth oauth mkCreds = AuthPlugin name dispatch login ] master <- getYesod accTok <- lift $ getAccessToken oauth reqTok (authHttpManager master) - creds <- resourceLiftBase $ mkCreds accTok + creds <- liftIO $ mkCreds accTok setCreds True creds dispatch _ _ = notFound login tm = do render <- lift getUrlRender let oaUrl = render $ tm $ oauthUrl name - addHtml - [shamlet| Login via #{name} |] + addWidget + [whamlet| Login via #{name} |] authTwitter :: YesodAuth m => ByteString -- ^ Consumer Key diff --git a/yesod-auth-oauth/yesod-auth-oauth.cabal b/yesod-auth-oauth/yesod-auth-oauth.cabal index aa50df9f..d3c92cc5 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: 0.8.1 +version: 1.0.0 license: BSD3 license-file: LICENSE author: Hiromi Ishii @@ -20,19 +20,16 @@ library build-depends: base >= 4.3 && < 5 cpp-options: -DGHC7 else - build-depends: base >= 4 && < 4.3 - build-depends: authenticate-oauth >= 1.1 && < 1.2 + build-depends: base >= 4 && < 4.3 + build-depends: authenticate-oauth >= 1.3 && < 1.4 , bytestring >= 0.9.1.4 && < 0.10 - , yesod-core >= 0.10 && < 0.11 - , yesod-auth >= 0.8 && < 0.9 + , yesod-core >= 1.0 && < 1.1 + , yesod-auth >= 1.0 && < 1.1 , text >= 0.7 && < 0.12 - , hamlet >= 0.10 && < 0.11 - , conduit >= 0.2 && < 0.3 - , yesod-form >= 0.4 && < 0.5 - + , yesod-form >= 1.0 && < 1.1 + , transformers >= 0.2.2 && < 0.3 exposed-modules: Yesod.Auth.OAuth ghc-options: -Wall - include-dirs: include source-repository head type: git