servant-auth-server-0.2.1.0: servant-server/servant-auth compatibility

Safe HaskellNone
LanguageHaskell2010

Servant.Auth.Server.Internal.BasicAuth

Synopsis

Documentation

wwwAuthenticatedErr :: ByteString -> ServantErr Source

A ServantErr that asks the client to authenticated via Basic Authentication. The argument is the realm.

type family BasicAuthCfg Source

class FromBasicAuthData a where Source

Methods

fromBasicAuthData :: BasicAuthData -> BasicAuthCfg -> IO (AuthResult a) Source

Whether the username exists and the password is correct. Note that, rather than passing a Pass to the function, we pass a function that checks an EncryptedPass. This is to make sure you don't accidentally do something untoward with the password, like store it.