Add general Authentication combinators
This commit is contained in:
parent
51dbd82c16
commit
038abb433d
3 changed files with 17 additions and 0 deletions
|
@ -26,6 +26,7 @@ source-repository head
|
|||
library
|
||||
exposed-modules:
|
||||
Servant.API
|
||||
Servant.API.Auth
|
||||
Servant.API.Alternative
|
||||
Servant.API.BasicAuth
|
||||
Servant.API.Capture
|
||||
|
|
|
@ -40,6 +40,9 @@ module Servant.API (
|
|||
-- * Response Headers
|
||||
module Servant.API.ResponseHeaders,
|
||||
|
||||
-- * General Authentication
|
||||
module Servant.API.Auth,
|
||||
|
||||
-- * Untyped endpoints
|
||||
module Servant.API.Raw,
|
||||
-- | Plugging in a wai 'Network.Wai.Application', serving directories
|
||||
|
@ -55,6 +58,7 @@ module Servant.API (
|
|||
|
||||
import Servant.API.Alternative ((:<|>) (..))
|
||||
import Servant.API.BasicAuth (BasicAuth,BasicAuthData(..))
|
||||
import Servant.API.Auth (AuthProtect)
|
||||
import Servant.API.Capture (Capture)
|
||||
import Servant.API.ContentTypes (Accept (..), FormUrlEncoded,
|
||||
FromFormUrlEncoded (..), JSON,
|
||||
|
|
12
servant/src/Servant/API/Auth.hs
Normal file
12
servant/src/Servant/API/Auth.hs
Normal file
|
@ -0,0 +1,12 @@
|
|||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE DeriveDataTypeable #-}
|
||||
{-# LANGUAGE KindSignatures #-}
|
||||
{-# LANGUAGE PolyKinds #-}
|
||||
module Servant.API.Auth where
|
||||
|
||||
import Data.Typeable (Typeable)
|
||||
|
||||
-- | A generalized Authentication combinator. Use this if you have a
|
||||
-- non-standard authentication technique.
|
||||
data AuthProtect (tag :: k) deriving (Typeable)
|
||||
|
Loading…
Reference in a new issue