polysemy-account-api-0.2.0.0: Account management with Servant and Polysemy
Safe HaskellSafe-Inferred
LanguageHaskell2010

Polysemy.Account.Api.Native

Description

 
Synopsis

Documentation

type AuthContext = [JWTSettings, CookieSettings] Source #

The Servant context for Jwt servers.

type ServerAuth api = HasServer api AuthContext Source #

Servant constraint for servers using JWT.

runServerJwtWith :: forall (api :: Type) (context :: [Type]) a e r. HasContextEntry (context .++ DefaultErrorFormatters) ErrorFormatters => HasServer api (AuthContext ++ context) => Members [Sync ServerReady, Jwt a !! e, Log, Interrupt, Error Text, Final IO] r => Context context -> ServerT api (Sem (Stop ServerError ': r)) -> Port -> Sem r () Source #

Run a Servant server with JSON Web Token authentication using settings from Jwt.

This variant allows supplying additional Contexts.

runServerJwt :: forall (api :: Type) a e r. ServerAuth api => Members [Sync ServerReady, Jwt a !! e, Log, Interrupt, Error Text, Final IO] r => ServerT api (Sem (Stop ServerError ': r)) -> Port -> Sem r () Source #

Run a Servant server with JSON Web Token authentication using settings from Jwt.