matebeamter/src/ClientAuth.hs

16 lines
424 B
Haskell
Raw Normal View History

2019-09-18 13:24:23 +00:00
{-# 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
2019-10-16 16:07:12 +00:00
authenticateReq = addHeader "Authentication"
2019-11-09 11:29:29 +00:00
nonAuthenticateRequest :: String -> Request -> Request
nonAuthenticateRequest _ = id