servant-auth-server-0.4.7.0: servant-server/servant-auth compatibility
Safe HaskellNone
LanguageHaskell2010

Servant.Auth.Server.Internal.Class

Contents

Synopsis

Documentation

class IsAuth a v where Source #

IsAuth a ctx v indicates that a is an auth type that expects all elements of ctx to be the in the Context and whose authentication check returns an AuthCheck v.

Associated Types

type AuthArgs a :: [*] Source #

Methods

runAuth :: proxy a -> proxy v -> Unapp (AuthArgs a) (AuthCheck v) Source #

Instances

Instances details
FromJWT usr => IsAuth JWT usr Source # 
Instance details

Defined in Servant.Auth.Server.Internal.Class

Associated Types

type AuthArgs JWT :: [Type] Source #

Methods

runAuth :: proxy JWT -> proxy usr -> Unapp (AuthArgs JWT) (AuthCheck usr) Source #

FromJWT usr => IsAuth Cookie usr Source # 
Instance details

Defined in Servant.Auth.Server.Internal.Class

Associated Types

type AuthArgs Cookie :: [Type] Source #

Methods

runAuth :: proxy Cookie -> proxy usr -> Unapp (AuthArgs Cookie) (AuthCheck usr) Source #

FromBasicAuthData usr => IsAuth BasicAuth usr Source # 
Instance details

Defined in Servant.Auth.Server.Internal.Class

Associated Types

type AuthArgs BasicAuth :: [Type] Source #

Methods

runAuth :: proxy BasicAuth -> proxy usr -> Unapp (AuthArgs BasicAuth) (AuthCheck usr) Source #

Helper

class AreAuths (as :: [*]) (ctxs :: [*]) v where Source #

Methods

runAuths :: proxy as -> Context ctxs -> AuthCheck v Source #

Instances

Instances details
AreAuths ('[] :: [Type]) ctxs v Source # 
Instance details

Defined in Servant.Auth.Server.Internal.Class

Methods

runAuths :: proxy '[] -> Context ctxs -> AuthCheck v Source #

(AuthCheck v ~ App (AuthArgs a) (Unapp (AuthArgs a) (AuthCheck v)), IsAuth a v, AreAuths as ctxs v, AppCtx ctxs (AuthArgs a) (Unapp (AuthArgs a) (AuthCheck v))) => AreAuths (a ': as) ctxs v Source # 
Instance details

Defined in Servant.Auth.Server.Internal.Class

Methods

runAuths :: proxy (a ': as) -> Context ctxs -> AuthCheck v Source #

type family Unapp ls res where ... Source #

Equations

Unapp '[] res = res 
Unapp (arg1 ': rest) res = arg1 -> Unapp rest res 

type family App ls res where ... Source #

Equations

App '[] res = res 
App (arg1 ': rest) (arg1 -> res) = App rest res 

class AppCtx ctx ls res where Source #

AppCtx applies the function res to the arguments in ls by taking the values from the Context provided.

Methods

appCtx :: proxy ls -> Context ctx -> res -> App ls res Source #

Instances

Instances details
AppCtx ctx ('[] :: [Type]) res Source # 
Instance details

Defined in Servant.Auth.Server.Internal.Class

Methods

appCtx :: proxy '[] -> Context ctx -> res -> App '[] res Source #

(HasContextEntry ctxs ctx, AppCtx ctxs rest res) => AppCtx ctxs (ctx ': rest) (ctx -> res) Source # 
Instance details

Defined in Servant.Auth.Server.Internal.Class

Methods

appCtx :: proxy (ctx ': rest) -> Context ctxs -> (ctx -> res) -> App (ctx ': rest) (ctx -> res) Source #