Specify kinds in BasicAuth and AuthProtect

This commit is contained in:
aaron levin 2016-01-08 12:10:11 +01:00
parent 752157a777
commit 4add914251

View file

@ -1,6 +1,7 @@
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE KindSignatures #-} {-# LANGUAGE KindSignatures #-}
{-# LANGUAGE PolyKinds #-}
module Servant.API.Auth where module Servant.API.Auth where
import Data.Typeable (Typeable) import Data.Typeable (Typeable)
@ -16,9 +17,9 @@ import GHC.TypeLits (Symbol)
-- In Basic Auth, username and password are base64-encoded and transmitted via -- In Basic Auth, username and password are base64-encoded and transmitted via
-- the @Authorization@ header. Handshakes are not required, making it -- the @Authorization@ header. Handshakes are not required, making it
-- relatively efficient. -- relatively efficient.
data BasicAuth (realm :: Symbol) usr data BasicAuth (realm :: Symbol) (usr :: *)
deriving (Typeable) deriving (Typeable)
-- | A generalized Authentication combinator. -- | A generalized Authentication combinator.
data AuthProtect tag usr data AuthProtect (tag :: k) (usr :: *)
deriving (Typeable) deriving (Typeable)