15 lines
424 B
Haskell
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
|