Permalink
Browse files

build sweetroll-be with ghc 8.2

  • Loading branch information...
myfreeweb committed Oct 31, 2017
1 parent 2f020fa commit 08273485bed5de0c766748828e1821add35c202a
@@ -3,6 +3,7 @@
module Sweetroll.App where
import Sweetroll.Prelude hiding (Context)
import Servant.Server
import Network.Wai.Middleware.AcceptOverride
import Network.Wai.Middleware.Autohead
import Network.Wai.Middleware.Cors
@@ -19,6 +19,7 @@ import qualified Data.ByteString.Char8 as S8
import Web.JWT hiding (header)
import qualified Network.Wai as Wai
import Servant.Server.Experimental.Auth
import Servant.Server
import Web.Cookie (parseCookies)
import Sweetroll.Context
import Sweetroll.Conf
@@ -31,7 +32,7 @@ instance HasLink sub ⇒ HasLink (AuthProtect "jwt" :> sub) where
authHandler Text AuthHandler Wai.Request (JWT VerifiedJWT)
authHandler secKey = mkAuthHandler h
where h req =
where h req = Servant.Server.Handler $
case asum [ fromHeader =<< lookup hAuthorization (Wai.requestHeaders req)
, join $ lookup "access_token" $ Wai.queryString req
, lookup "Bearer" =<< parseCookies <$> lookup hCookie (Wai.requestHeaders req)
@@ -10,7 +10,7 @@ module Sweetroll.HTTPClient (
, responseBody
) where
import Sweetroll.Prelude
import Sweetroll.Prelude hiding (($$))
import Data.Conduit
import qualified Data.HashMap.Strict as HMS
import qualified Data.Set as S
View
@@ -2,7 +2,8 @@ packages:
- '.'
- location: '../indieweb-algorithms'
extra-dep: true
- location: '../../magicbane'
extra-dep: true
extra-deps:
- hasql-pool-0.4.1
- rapid-0.1.3
resolver: lts-8.14
resolver: nightly-2017-10-31

0 comments on commit 0827348

Please sign in to comment.