servant-server-0.11: A family of combinators for defining webservices APIs and serving them

Safe Haskell | None
Language | Haskell2010

Servant.Server.Experimental.Auth

Contents

- General Auth
- Orphan instances

Synopsis

- type family AuthServerData a :: *
- newtype AuthHandler r usr = AuthHandler {
  - unAuthHandler :: r -> Handler usr
  }
- mkAuthHandler :: (r -> Handler usr) -> AuthHandler r usr

# General Auth

type family AuthServerData a :: * #

Specify the type of data returned after we've authenticated a request. quite often this is some `User` datatype.

NOTE: THIS API IS EXPERIMENTAL AND SUBJECT TO CHANGE

newtype AuthHandler r usr #

Handlers for AuthProtected resources

NOTE: THIS API IS EXPERIMENTAL AND SUBJECT TO CHANGE

Constructors

AuthHandler |
Fields unAuthHandler :: r -> Handler usr

Instances

Generic (AuthHandler r usr) # |
Associated Types type Rep (AuthHandler r usr) :: * -> * # Methods from :: AuthHandler r usr -> Rep (AuthHandler r usr) x # to :: Rep (AuthHandler r usr) x -> AuthHandler r usr #
type Rep (AuthHandler r usr) # |
type Rep (AuthHandler r usr) = D1 (MetaData "AuthHandler" "Servant.Server.Experimental.Auth" "servant-server-0.11-IADlUM83Uj7GUOFTlU9US9" True) (C1 (MetaCons "AuthHandler" PrefixI True) (S1 (MetaSel (Just Symbol "unAuthHandler") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (r -> Handler usr))))

mkAuthHandler :: (r -> Handler usr) -> AuthHandler r usr #

NOTE: THIS API IS EXPERIMENTAL AND SUBJECT TO CHANGE

# Orphan instances

(HasServer k1 api context, HasContextEntry context (AuthHandler Request (AuthServerData (AuthProtect k tag)))) => HasServer * ((:>) k1 * (AuthProtect k tag) api) context # | Known orphan instance.
Associated Types type ServerT ((:>) k1 * (AuthProtect k tag) api) (context :: (:>) k1 * (AuthProtect k tag) api) (m :: * -> *) :: * # Methods route :: Proxy ((k1 :> *) (AuthProtect k tag) api) context -> Context context -> Delayed env (Server ((k1 :> *) (AuthProtect k tag) api) context) -> Router env #