| Safe Haskell | Safe |
|---|
System.Posix.PAM
Synopsis
- isSuccess :: PamRetCode -> Bool
- whenSuccess :: MonadIO m => PamRetCode -> m PamRetCode -> m PamRetCode
- authenticate :: MonadIO m => String -> String -> String -> m PamRetCode
- checkAccount :: MonadIO m => String -> String -> m PamRetCode
- pamCodeToMessage :: PamRetCode -> String
- pamCodeToCDefine :: PamRetCode -> String
- pamCodeDetails :: PamRetCode -> (String, String)
Documentation
isSuccess :: PamRetCode -> Bool Source #
isSuccess responseCode checks if responseCode is equal to PamSuccess,
i.e. checking if the account check/authentication succeeded
whenSuccess :: MonadIO m => PamRetCode -> m PamRetCode -> m PamRetCode Source #
whenSuccess responseCode action returns action if responseCode is
PamSuccess, otherwise returns responseCode
authenticate :: MonadIO m => String -> String -> String -> m PamRetCode Source #
authenticate service user password attempts to authenticate user and
password with PAM using service to determine which file in etcpam.d to
use
checkAccount :: MonadIO m => String -> String -> m PamRetCode Source #
checkAccount service user checks if user is a valid user. service is
is the service name given to PAM (see authenticate)
pamCodeToMessage :: PamRetCode -> String Source #
pamCodeToMessage responseCode returns a description of responseCode
in the context of PAM
pamCodeToCDefine :: PamRetCode -> String Source #
pamCodeToMessage responseCode returns the name of the define used in C
to represent responseCode
pamCodeDetails :: PamRetCode -> (String, String) Source #
pamCodeDetails responseCode returns a tuple of the name of the C define
and a description of responseCode