minion-0.1.0.0: A Haskell introspectable web router
Safe HaskellSafe-Inferred
LanguageHaskell2010

Web.Minion.Auth

Documentation

newtype Auth (auths :: [Type]) a Source #

Constructors

Auth a 

Instances

Instances details
IsRequest (Auth auths a) Source # 
Instance details

Defined in Web.Minion.Auth

Associated Types

type RequestValue (Auth auths a) Source #

Methods

getRequestValue :: Auth auths a -> RequestValue (Auth auths a) Source #

type RequestValue (Auth auths a) Source # 
Instance details

Defined in Web.Minion.Auth

type RequestValue (Auth auths a) = a

data AuthResult a Source #

Constructors

Indefinite 
BadAuth 
Authenticated a 

Instances

Instances details
Functor AuthResult Source # 
Instance details

Defined in Web.Minion.Auth

Methods

fmap :: (a -> b) -> AuthResult a -> AuthResult b #

(<$) :: a -> AuthResult b -> AuthResult a #

class UnwindAuth (ctx :: [Type]) (auths :: [Type]) m a where Source #

Methods

unwindAuth :: [HList ctx -> ErrorBuilder -> Request -> m (AuthResult a)] Source #

Instances

Instances details
UnwindAuth ctx ('[] :: [Type]) m a Source # 
Instance details

Defined in Web.Minion.Auth

Methods

unwindAuth :: [HList ctx -> ErrorBuilder -> Request -> m (AuthResult a)] Source #

(IsAuth auth m a, UnwindAuth ctx auths m a, GetByType (Settings auth m a) ctx) => UnwindAuth ctx (auth ': auths) m a Source # 
Instance details

Defined in Web.Minion.Auth

Methods

unwindAuth :: [HList ctx -> ErrorBuilder -> Request -> m (AuthResult a)] Source #

class IsAuth (auth :: Type) m a where Source #

Associated Types

type Settings auth m a :: Type Source #

Methods

toAuth :: Settings auth m a -> ErrorBuilder -> Request -> m (AuthResult a) Source #

Instances

Instances details
Monad m => IsAuth Basic m a Source # 
Instance details

Defined in Web.Minion.Auth.Basic

Associated Types

type Settings Basic m a Source #

auth Source #

Arguments

:: forall auths a m ctx ts i. Introspection i Request (Auth auths a) 
=> UnwindAuth ctx auths m a 
=> MonadThrow m 
=> m (HList ctx)

Context with auths settings

-> (MakeError -> AuthResult Void -> m Void)

Handle non-Authenticated.

-> ValueCombinator i (WithReq m (Auth auths a)) ts m