Update servant-client for new GADT-based auth
This commit is contained in:
parent
8a26dc52c5
commit
cef2e87aa6
2 changed files with 2 additions and 3 deletions
|
@ -122,8 +122,8 @@ instance (KnownSymbol capture, ToHttpApiData a, HasClient sublayout)
|
||||||
where p = unpack (toUrlPiece val)
|
where p = unpack (toUrlPiece val)
|
||||||
|
|
||||||
-- | Authentication
|
-- | Authentication
|
||||||
instance (AuthenticateRequest authdata, HasClient sublayout) => HasClient (AuthProtect authdata (usr :: *) policy :> sublayout) where
|
instance (AuthenticateRequest authdata, HasClient sublayout) => HasClient (AuthProtect authdata (usr :: *) mPolicy mError uPolicy uError :> sublayout) where
|
||||||
type Client (AuthProtect authdata usr policy :> sublayout) = authdata -> Client sublayout
|
type Client (AuthProtect authdata usr mPolicy mError uPolicy uError :> sublayout) = authdata -> Client sublayout
|
||||||
|
|
||||||
clientWithRoute Proxy req baseurl manager val =
|
clientWithRoute Proxy req baseurl manager val =
|
||||||
clientWithRoute (Proxy :: Proxy sublayout)
|
clientWithRoute (Proxy :: Proxy sublayout)
|
||||||
|
|
|
@ -9,7 +9,6 @@ module Servant.Client.Authentication (
|
||||||
|
|
||||||
import Data.ByteString.Base64 (encode)
|
import Data.ByteString.Base64 (encode)
|
||||||
import Data.Monoid ((<>))
|
import Data.Monoid ((<>))
|
||||||
import Data.Text (Text)
|
|
||||||
import Data.Text.Encoding (decodeUtf8)
|
import Data.Text.Encoding (decodeUtf8)
|
||||||
import Servant.API.Authentication (BasicAuth(BasicAuth), JWTAuth(..))
|
import Servant.API.Authentication (BasicAuth(BasicAuth), JWTAuth(..))
|
||||||
import Servant.Common.Req (addHeader, Req)
|
import Servant.Common.Req (addHeader, Req)
|
||||||
|
|
Loading…
Reference in a new issue