Specify kinds in BasicAuth and AuthProtect
This commit is contained in:
parent
752157a777
commit
4add914251
1 changed files with 3 additions and 2 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue