{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeSynonymInstances #-}
module Servant.Client.Core.Auth (
AuthClientData,
AuthenticatedRequest (..),
mkAuthenticatedRequest,
) where
import Data.Kind (Type)
import Servant.Client.Core.Request
(Request)
type family AuthClientData a :: Type
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 = (AuthClientData a, AuthClientData a -> Request -> Request)
-> AuthenticatedRequest a
forall a.
(AuthClientData a, AuthClientData a -> Request -> Request)
-> AuthenticatedRequest a
AuthenticatedRequest (AuthClientData a
val, AuthClientData a -> Request -> Request
func)