git.iko.soy/typeable/servant
on master help sign in
Add general Authentication combinators
commit038abb433d8621e80086f13c814ee849cebcaa82 authoraaron levin <aaron.levin@soundcloud.com> dateWed 17 Feb 2016, 20:59 (11 years ago) parent51dbd82
3 files changed+17
servant/servant.cabal+1 servant/src/Servant/API.hs+4 servant/src/Servant/API/Auth.hs+12
servant/servant.cabal+1
@@ -26,6 +26,7 @@ source-repository head
2626library
2727 exposed-modules:
2828 Servant.API
29+ Servant.API.Auth
2930 Servant.API.Alternative
3031 Servant.API.BasicAuth
3132 Servant.API.Capture
servant/src/Servant/API.hs+4
@@ -40,6 +40,9 @@ module Servant.API (
4040 -- * Response Headers
4141 module Servant.API.ResponseHeaders,
4242
43+ -- * General Authentication
44+ module Servant.API.Auth,
45+
4346 -- * Untyped endpoints
4447 module Servant.API.Raw,
4548 -- | Plugging in a wai 'Network.Wai.Application', serving directories
@@ -55,6 +58,7 @@ module Servant.API (
5558
5659import Servant.API.Alternative ((:<|>) (..))
5760import Servant.API.BasicAuth (BasicAuth,BasicAuthData(..))
61+import Servant.API.Auth (AuthProtect)
5862import Servant.API.Capture (Capture)
5963import Servant.API.ContentTypes (Accept (..), FormUrlEncoded,
6064 FromFormUrlEncoded (..), JSON,
servant/src/Servant/API/Auth.hsnew file+12
@@ -0,0 +1,12 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE KindSignatures #-}
4+{-# LANGUAGE PolyKinds #-}
5+module Servant.API.Auth where
6+
7+import Data.Typeable (Typeable)
8+
9+-- | A generalized Authentication combinator. Use this if you have a
10+-- non-standard authentication technique.
11+data AuthProtect (tag :: k) deriving (Typeable)
12+