{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeSynonymInstances #-}
module Servant.Client.Core.Auth (
AuthClientData,
AuthenticatedRequest (..),
mkAuthenticatedRequest,
) where
import Servant.Client.Core.Request
(Request)
type family AuthClientData a :: *
newtype AuthenticatedRequest a =
AuthenticatedRequest { forall a.
AuthenticatedRequest a
-> (AuthClientData a, AuthClientData a -> Request -> Request)
unAuthReq :: (AuthClientData a, AuthClientData a -> Request -> Request) }
mkAuthenticatedRequest :: AuthClientData a
-> (AuthClientData a -> Request -> Request)
-> AuthenticatedRequest a
mkAuthenticatedRequest :: forall a.
AuthClientData a
-> (AuthClientData a -> Request -> Request)
-> AuthenticatedRequest a
mkAuthenticatedRequest AuthClientData a
val AuthClientData a -> Request -> Request
func = forall a.
(AuthClientData a, AuthClientData a -> Request -> Request)
-> AuthenticatedRequest a
AuthenticatedRequest (AuthClientData a
val, AuthClientData a -> Request -> Request
func)