Update servant-client for new GADT-based auth

This commit is contained in:
aaron levin 2015-12-24 22:19:29 +01:00
parent 8a26dc52c5
commit cef2e87aa6
2 changed files with 2 additions and 3 deletions

View file

@ -122,8 +122,8 @@ instance (KnownSymbol capture, ToHttpApiData a, HasClient sublayout)
where p = unpack (toUrlPiece val)
-- | Authentication
instance (AuthenticateRequest authdata, HasClient sublayout) => HasClient (AuthProtect authdata (usr :: *) policy :> sublayout) where
type Client (AuthProtect authdata usr policy :> sublayout) = authdata -> Client sublayout
instance (AuthenticateRequest authdata, HasClient sublayout) => HasClient (AuthProtect authdata (usr :: *) mPolicy mError uPolicy uError :> sublayout) where
type Client (AuthProtect authdata usr mPolicy mError uPolicy uError :> sublayout) = authdata -> Client sublayout
clientWithRoute Proxy req baseurl manager val =
clientWithRoute (Proxy :: Proxy sublayout)

View file

@ -9,7 +9,6 @@ module Servant.Client.Authentication (
import Data.ByteString.Base64 (encode)
import Data.Monoid ((<>))
import Data.Text (Text)
import Data.Text.Encoding (decodeUtf8)
import Servant.API.Authentication (BasicAuth(BasicAuth), JWTAuth(..))
import Servant.Common.Req (addHeader, Req)