mirror of
https://github.com/freckle/yesod-auth-oauth2.git
synced 2026-04-25 12:17:45 +02:00
Drop support for GHC < 7.10
This commit is contained in:
parent
52c726b598
commit
e8f413ebab
@ -11,7 +11,7 @@ github: thoughtbot/yesod-auth-oauth2.git
|
|||||||
homepage: http://github.com/thoughtbot/yesod-auth-oauth2
|
homepage: http://github.com/thoughtbot/yesod-auth-oauth2
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
- base >=4.5 && <5
|
- base >=4.8.0.0 && <5
|
||||||
|
|
||||||
library:
|
library:
|
||||||
source-dirs: src
|
source-dirs: src
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
{-# LANGUAGE CPP #-}
|
|
||||||
{-# LANGUAGE DeriveDataTypeable #-}
|
{-# LANGUAGE DeriveDataTypeable #-}
|
||||||
{-# LANGUAGE FlexibleContexts #-}
|
{-# LANGUAGE FlexibleContexts #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
@ -24,10 +23,6 @@ module Yesod.Auth.OAuth2
|
|||||||
, module URI.ByteString.Extension
|
, module URI.ByteString.Extension
|
||||||
) where
|
) where
|
||||||
|
|
||||||
#if __GLASGOW_HASKELL__ < 710
|
|
||||||
import Control.Applicative ((<$>))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
import Control.Exception.Lifted
|
import Control.Exception.Lifted
|
||||||
import Control.Monad (unless)
|
import Control.Monad (unless)
|
||||||
import Control.Monad.IO.Class
|
import Control.Monad.IO.Class
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
{-# LANGUAGE CPP #-}
|
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
|
|
||||||
-- |
|
-- |
|
||||||
@ -13,10 +12,6 @@ module Yesod.Auth.OAuth2.BattleNet
|
|||||||
( oAuth2BattleNet
|
( oAuth2BattleNet
|
||||||
) where
|
) where
|
||||||
|
|
||||||
#if __GLASGOW_HASKELL__ < 710
|
|
||||||
import Control.Applicative ((<$>), (<*>))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
import Control.Exception (throwIO)
|
import Control.Exception (throwIO)
|
||||||
import Control.Monad (mzero)
|
import Control.Monad (mzero)
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
{-# LANGUAGE CPP #-}
|
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
-- |
|
-- |
|
||||||
--
|
--
|
||||||
@ -14,10 +13,6 @@ module Yesod.Auth.OAuth2.Bitbucket
|
|||||||
, module Yesod.Auth.OAuth2
|
, module Yesod.Auth.OAuth2
|
||||||
) where
|
) where
|
||||||
|
|
||||||
#if __GLASGOW_HASKELL__ < 710
|
|
||||||
import Control.Applicative ((<$>), (<*>))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
import Control.Exception.Lifted (throwIO)
|
import Control.Exception.Lifted (throwIO)
|
||||||
import Control.Monad (mzero)
|
import Control.Monad (mzero)
|
||||||
import Data.Aeson (FromJSON, Value(Object), parseJSON, (.:), (.:?))
|
import Data.Aeson (FromJSON, Value(Object), parseJSON, (.:), (.:?))
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
{-# LANGUAGE CPP #-}
|
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
{-# LANGUAGE QuasiQuotes #-}
|
{-# LANGUAGE QuasiQuotes #-}
|
||||||
-- |
|
-- |
|
||||||
@ -16,10 +15,6 @@ module Yesod.Auth.OAuth2.EveOnline
|
|||||||
, module Yesod.Auth.OAuth2
|
, module Yesod.Auth.OAuth2
|
||||||
) where
|
) where
|
||||||
|
|
||||||
#if __GLASGOW_HASKELL__ < 710
|
|
||||||
import Control.Applicative ((<$>), (<*>))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
import Control.Exception.Lifted
|
import Control.Exception.Lifted
|
||||||
import Control.Monad (mzero)
|
import Control.Monad (mzero)
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
{-# LANGUAGE CPP #-}
|
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
-- |
|
-- |
|
||||||
--
|
--
|
||||||
@ -14,10 +13,6 @@ module Yesod.Auth.OAuth2.Github
|
|||||||
, module Yesod.Auth.OAuth2
|
, module Yesod.Auth.OAuth2
|
||||||
) where
|
) where
|
||||||
|
|
||||||
#if __GLASGOW_HASKELL__ < 710
|
|
||||||
import Control.Applicative ((<$>), (<*>))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
import Control.Exception.Lifted
|
import Control.Exception.Lifted
|
||||||
import Control.Monad (mzero)
|
import Control.Monad (mzero)
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
{-# LANGUAGE CPP #-}
|
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
-- |
|
-- |
|
||||||
--
|
--
|
||||||
@ -21,10 +20,6 @@ module Yesod.Auth.OAuth2.Google
|
|||||||
, module Yesod.Auth.OAuth2
|
, module Yesod.Auth.OAuth2
|
||||||
) where
|
) where
|
||||||
|
|
||||||
#if __GLASGOW_HASKELL__ < 710
|
|
||||||
import Control.Applicative ((<$>), (<*>))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
import Control.Exception.Lifted
|
import Control.Exception.Lifted
|
||||||
import Control.Monad (mzero)
|
import Control.Monad (mzero)
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
{-# LANGUAGE CPP #-}
|
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
|
|
||||||
module Yesod.Auth.OAuth2.Nylas
|
module Yesod.Auth.OAuth2.Nylas
|
||||||
@ -6,10 +5,6 @@ module Yesod.Auth.OAuth2.Nylas
|
|||||||
, module Yesod.Auth.OAuth2
|
, module Yesod.Auth.OAuth2
|
||||||
) where
|
) where
|
||||||
|
|
||||||
#if __GLASGOW_HASKELL__ < 710
|
|
||||||
import Control.Applicative ((<$>), (<*>))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
import Control.Exception.Lifted (throwIO)
|
import Control.Exception.Lifted (throwIO)
|
||||||
import Control.Monad (mzero)
|
import Control.Monad (mzero)
|
||||||
import Data.Aeson (FromJSON, Value(..), decode, parseJSON, (.:))
|
import Data.Aeson (FromJSON, Value(..), decode, parseJSON, (.:))
|
||||||
@ -18,11 +13,10 @@ import Data.Text.Encoding (encodeUtf8)
|
|||||||
import Network.HTTP.Client
|
import Network.HTTP.Client
|
||||||
(applyBasicAuth, httpLbs, parseRequest, responseBody, responseStatus)
|
(applyBasicAuth, httpLbs, parseRequest, responseBody, responseStatus)
|
||||||
import Network.HTTP.Conduit (Manager)
|
import Network.HTTP.Conduit (Manager)
|
||||||
|
import qualified Network.HTTP.Types as HT
|
||||||
import Yesod.Auth (AuthPlugin, Creds(..), YesodAuth)
|
import Yesod.Auth (AuthPlugin, Creds(..), YesodAuth)
|
||||||
import Yesod.Auth.OAuth2
|
import Yesod.Auth.OAuth2
|
||||||
|
|
||||||
import qualified Network.HTTP.Types as HT
|
|
||||||
|
|
||||||
data NylasAccount = NylasAccount
|
data NylasAccount = NylasAccount
|
||||||
{ nylasAccountId :: Text
|
{ nylasAccountId :: Text
|
||||||
, nylasAccountEmailAddress :: Text
|
, nylasAccountEmailAddress :: Text
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
{-# LANGUAGE CPP #-}
|
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
{-# LANGUAGE RecordWildCards #-}
|
{-# LANGUAGE RecordWildCards #-}
|
||||||
-- |
|
-- |
|
||||||
@ -17,20 +16,15 @@ module Yesod.Auth.OAuth2.Salesforce
|
|||||||
, module Yesod.Auth.OAuth2
|
, module Yesod.Auth.OAuth2
|
||||||
) where
|
) where
|
||||||
|
|
||||||
#if __GLASGOW_HASKELL__ < 710
|
|
||||||
import Control.Applicative ((<$>), (<*>))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
import Control.Exception.Lifted
|
import Control.Exception.Lifted
|
||||||
import Control.Monad (mzero)
|
import Control.Monad (mzero)
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
import Data.Text (Text)
|
import Data.Text (Text)
|
||||||
|
import qualified Data.Text as T
|
||||||
import Network.HTTP.Conduit (Manager)
|
import Network.HTTP.Conduit (Manager)
|
||||||
import Yesod.Auth
|
import Yesod.Auth
|
||||||
import Yesod.Auth.OAuth2
|
import Yesod.Auth.OAuth2
|
||||||
|
|
||||||
import qualified Data.Text as T
|
|
||||||
|
|
||||||
oauth2Salesforce :: YesodAuth m
|
oauth2Salesforce :: YesodAuth m
|
||||||
=> Text -- ^ Client ID
|
=> Text -- ^ Client ID
|
||||||
-> Text -- ^ Client Secret
|
-> Text -- ^ Client Secret
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
{-# LANGUAGE CPP #-}
|
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
-- |
|
-- |
|
||||||
--
|
--
|
||||||
@ -9,20 +8,15 @@ module Yesod.Auth.OAuth2.Spotify
|
|||||||
, module Yesod.Auth.OAuth2
|
, module Yesod.Auth.OAuth2
|
||||||
) where
|
) where
|
||||||
|
|
||||||
#if __GLASGOW_HASKELL__ < 710
|
|
||||||
import Control.Applicative (pure, (<$>), (<*>))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
import Control.Monad (mzero)
|
import Control.Monad (mzero)
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
import Data.Maybe
|
import Data.Maybe
|
||||||
import Data.Text (Text)
|
import Data.Text (Text)
|
||||||
|
import qualified Data.Text as T
|
||||||
import Data.Text.Encoding (encodeUtf8)
|
import Data.Text.Encoding (encodeUtf8)
|
||||||
import Yesod.Auth
|
import Yesod.Auth
|
||||||
import Yesod.Auth.OAuth2
|
import Yesod.Auth.OAuth2
|
||||||
|
|
||||||
import qualified Data.Text as T
|
|
||||||
|
|
||||||
data SpotifyUserImage = SpotifyUserImage
|
data SpotifyUserImage = SpotifyUserImage
|
||||||
{ spotifyUserImageHeight :: Maybe Int
|
{ spotifyUserImageHeight :: Maybe Int
|
||||||
, spotifyUserImageWidth :: Maybe Int
|
, spotifyUserImageWidth :: Maybe Int
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
{-# LANGUAGE CPP #-}
|
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
-- |
|
-- |
|
||||||
--
|
--
|
||||||
@ -13,10 +12,6 @@ module Yesod.Auth.OAuth2.Upcase
|
|||||||
, module Yesod.Auth.OAuth2
|
, module Yesod.Auth.OAuth2
|
||||||
) where
|
) where
|
||||||
|
|
||||||
#if __GLASGOW_HASKELL__ < 710
|
|
||||||
import Control.Applicative ((<$>), (<*>))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
import Control.Monad (mzero)
|
import Control.Monad (mzero)
|
||||||
import Data.Aeson
|
import Data.Aeson
|
||||||
import Data.Text (Text)
|
import Data.Text (Text)
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
---
|
---
|
||||||
resolver: lts-10.1
|
resolver: lts-10.3
|
||||||
packages:
|
packages:
|
||||||
- .
|
- .
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user