servant-auth-server-0.4.9.0: servant-server/servant-auth compatibility
Safe HaskellSafe-Inferred
LanguageHaskell2010

Servant.Auth.Server.Internal.Types

Synopsis

Documentation

data AuthResult val Source #

The result of an authentication attempt.

Constructors

BadPassword 
NoSuchUser 
Authenticated val

Authentication succeeded.

Indefinite

If an authentication procedure cannot be carried out - if for example it expects a password and username in a header that is not present - Indefinite is returned. This indicates that other authentication methods should be tried.

Instances

Instances details
Foldable AuthResult Source # 
Instance details

Defined in Servant.Auth.Server.Internal.Types

Methods

fold :: Monoid m => AuthResult m -> m #

foldMap :: Monoid m => (a -> m) -> AuthResult a -> m #

foldMap' :: Monoid m => (a -> m) -> AuthResult a -> m #

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

foldr' :: (a -> b -> b) -> b -> AuthResult a -> b #

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

foldl' :: (b -> a -> b) -> b -> AuthResult a -> b #

foldr1 :: (a -> a -> a) -> AuthResult a -> a #

foldl1 :: (a -> a -> a) -> AuthResult a -> a #

toList :: AuthResult a -> [a] #

null :: AuthResult a -> Bool #

length :: AuthResult a -> Int #

elem :: Eq a => a -> AuthResult a -> Bool #

maximum :: Ord a => AuthResult a -> a #

minimum :: Ord a => AuthResult a -> a #

sum :: Num a => AuthResult a -> a #

product :: Num a => AuthResult a -> a #

Traversable AuthResult Source # 
Instance details

Defined in Servant.Auth.Server.Internal.Types

Methods

traverse :: Applicative f => (a -> f b) -> AuthResult a -> f (AuthResult b) #

sequenceA :: Applicative f => AuthResult (f a) -> f (AuthResult a) #

mapM :: Monad m => (a -> m b) -> AuthResult a -> m (AuthResult b) #

sequence :: Monad m => AuthResult (m a) -> m (AuthResult a) #

Alternative AuthResult Source # 
Instance details

Defined in Servant.Auth.Server.Internal.Types

Applicative AuthResult Source # 
Instance details

Defined in Servant.Auth.Server.Internal.Types

Methods

pure :: a -> AuthResult a #

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

liftA2 :: (a -> b -> c) -> AuthResult a -> AuthResult b -> AuthResult c #

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

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

Functor AuthResult Source # 
Instance details

Defined in Servant.Auth.Server.Internal.Types

Methods

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

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

Monad AuthResult Source # 
Instance details

Defined in Servant.Auth.Server.Internal.Types

Methods

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

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

return :: a -> AuthResult a #

MonadPlus AuthResult Source # 
Instance details

Defined in Servant.Auth.Server.Internal.Types

Monoid (AuthResult val) Source # 
Instance details

Defined in Servant.Auth.Server.Internal.Types

Methods

mempty :: AuthResult val #

mappend :: AuthResult val -> AuthResult val -> AuthResult val #

mconcat :: [AuthResult val] -> AuthResult val #

Semigroup (AuthResult val) Source # 
Instance details

Defined in Servant.Auth.Server.Internal.Types

Methods

(<>) :: AuthResult val -> AuthResult val -> AuthResult val #

sconcat :: NonEmpty (AuthResult val) -> AuthResult val #

stimes :: Integral b => b -> AuthResult val -> AuthResult val #

Generic (AuthResult val) Source # 
Instance details

Defined in Servant.Auth.Server.Internal.Types

Associated Types

type Rep (AuthResult val) :: Type -> Type #

Methods

from :: AuthResult val -> Rep (AuthResult val) x #

to :: Rep (AuthResult val) x -> AuthResult val #

Read val => Read (AuthResult val) Source # 
Instance details

Defined in Servant.Auth.Server.Internal.Types

Show val => Show (AuthResult val) Source # 
Instance details

Defined in Servant.Auth.Server.Internal.Types

Methods

showsPrec :: Int -> AuthResult val -> ShowS #

show :: AuthResult val -> String #

showList :: [AuthResult val] -> ShowS #

Eq val => Eq (AuthResult val) Source # 
Instance details

Defined in Servant.Auth.Server.Internal.Types

Methods

(==) :: AuthResult val -> AuthResult val -> Bool #

(/=) :: AuthResult val -> AuthResult val -> Bool #

Ord val => Ord (AuthResult val) Source # 
Instance details

Defined in Servant.Auth.Server.Internal.Types

Methods

compare :: AuthResult val -> AuthResult val -> Ordering #

(<) :: AuthResult val -> AuthResult val -> Bool #

(<=) :: AuthResult val -> AuthResult val -> Bool #

(>) :: AuthResult val -> AuthResult val -> Bool #

(>=) :: AuthResult val -> AuthResult val -> Bool #

max :: AuthResult val -> AuthResult val -> AuthResult val #

min :: AuthResult val -> AuthResult val -> AuthResult val #

type Rep (AuthResult val) Source # 
Instance details

Defined in Servant.Auth.Server.Internal.Types

type Rep (AuthResult val) = D1 ('MetaData "AuthResult" "Servant.Auth.Server.Internal.Types" "servant-auth-server-0.4.9.0-JicIkdxdNDE9KNv4CWRn7m" 'False) ((C1 ('MetaCons "BadPassword" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NoSuchUser" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Authenticated" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 val)) :+: C1 ('MetaCons "Indefinite" 'PrefixI 'False) (U1 :: Type -> Type)))

newtype AuthCheck val Source #

An AuthCheck is the function used to decide the authentication status (the AuthResult) of a request. Different AuthChecks may be combined as a Monoid or Alternative; the semantics of this is that the *first* non-Indefinite result from left to right is used and the rest are ignored.

Constructors

AuthCheck 

Fields

Instances

Instances details
MonadFail AuthCheck Source # 
Instance details

Defined in Servant.Auth.Server.Internal.Types

Methods

fail :: String -> AuthCheck a #

MonadIO AuthCheck Source # 
Instance details

Defined in Servant.Auth.Server.Internal.Types

Methods

liftIO :: IO a -> AuthCheck a #

Alternative AuthCheck Source # 
Instance details

Defined in Servant.Auth.Server.Internal.Types

Methods

empty :: AuthCheck a #

(<|>) :: AuthCheck a -> AuthCheck a -> AuthCheck a #

some :: AuthCheck a -> AuthCheck [a] #

many :: AuthCheck a -> AuthCheck [a] #

Applicative AuthCheck Source # 
Instance details

Defined in Servant.Auth.Server.Internal.Types

Methods

pure :: a -> AuthCheck a #

(<*>) :: AuthCheck (a -> b) -> AuthCheck a -> AuthCheck b #

liftA2 :: (a -> b -> c) -> AuthCheck a -> AuthCheck b -> AuthCheck c #

(*>) :: AuthCheck a -> AuthCheck b -> AuthCheck b #

(<*) :: AuthCheck a -> AuthCheck b -> AuthCheck a #

Functor AuthCheck Source # 
Instance details

Defined in Servant.Auth.Server.Internal.Types

Methods

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

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

Monad AuthCheck Source # 
Instance details

Defined in Servant.Auth.Server.Internal.Types

Methods

(>>=) :: AuthCheck a -> (a -> AuthCheck b) -> AuthCheck b #

(>>) :: AuthCheck a -> AuthCheck b -> AuthCheck b #

return :: a -> AuthCheck a #

MonadPlus AuthCheck Source # 
Instance details

Defined in Servant.Auth.Server.Internal.Types

Methods

mzero :: AuthCheck a #

mplus :: AuthCheck a -> AuthCheck a -> AuthCheck a #

MonadTime AuthCheck Source # 
Instance details

Defined in Servant.Auth.Server.Internal.Types

MonadReader Request AuthCheck Source # 
Instance details

Defined in Servant.Auth.Server.Internal.Types

Methods

ask :: AuthCheck Request #

local :: (Request -> Request) -> AuthCheck a -> AuthCheck a #

reader :: (Request -> a) -> AuthCheck a #

Monoid (AuthCheck val) Source # 
Instance details

Defined in Servant.Auth.Server.Internal.Types

Methods

mempty :: AuthCheck val #

mappend :: AuthCheck val -> AuthCheck val -> AuthCheck val #

mconcat :: [AuthCheck val] -> AuthCheck val #

Semigroup (AuthCheck val) Source # 
Instance details

Defined in Servant.Auth.Server.Internal.Types

Methods

(<>) :: AuthCheck val -> AuthCheck val -> AuthCheck val #

sconcat :: NonEmpty (AuthCheck val) -> AuthCheck val #

stimes :: Integral b => b -> AuthCheck val -> AuthCheck val #

Generic (AuthCheck val) Source # 
Instance details

Defined in Servant.Auth.Server.Internal.Types

Associated Types

type Rep (AuthCheck val) :: Type -> Type #

Methods

from :: AuthCheck val -> Rep (AuthCheck val) x #

to :: Rep (AuthCheck val) x -> AuthCheck val #

type Rep (AuthCheck val) Source # 
Instance details

Defined in Servant.Auth.Server.Internal.Types

type Rep (AuthCheck val) = D1 ('MetaData "AuthCheck" "Servant.Auth.Server.Internal.Types" "servant-auth-server-0.4.9.0-JicIkdxdNDE9KNv4CWRn7m" 'True) (C1 ('MetaCons "AuthCheck" 'PrefixI 'True) (S1 ('MetaSel ('Just "runAuthCheck") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Request -> IO (AuthResult val)))))