matebeamter/src/ClientAuth.hs
2019-11-09 12:29:29 +01:00

15 lines
424 B
Haskell

{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE OverloadedStrings #-}
module ClientAuth where
import Servant.API (AuthProtect)
import Servant.Client.Core
type instance AuthClientData (AuthProtect "header-auth") = String
authenticateReq :: String -> Request -> Request
authenticateReq = addHeader "Authentication"
nonAuthenticateRequest :: String -> Request -> Request
nonAuthenticateRequest _ = id