-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Haskell binding for C LDAP API -- -- Haskell binding for C LDAP API @package LDAP @version 0.6.5 -- | Maintainer : jgoerzen@complete.org Stability : provisional -- Portability: portable -- -- Haskell types for LDAP constants -- -- Written by John Goerzen, jgoerzen@complete.org module LDAP.Data data LDAPReturnCode LdapSuccess :: LDAPReturnCode LdapOperationsError :: LDAPReturnCode LdapProtocolError :: LDAPReturnCode LdapTimelimitExceeded :: LDAPReturnCode LdapSizelimitExceeded :: LDAPReturnCode LdapCompareFalse :: LDAPReturnCode LdapCompareTrue :: LDAPReturnCode LdapAuthMethodNotSupported :: LDAPReturnCode LdapStrongAuthNotSupported :: LDAPReturnCode LdapStrongAuthRequired :: LDAPReturnCode LdapPartialResults :: LDAPReturnCode LdapReferral :: LDAPReturnCode LdapAdminlimitExceeded :: LDAPReturnCode LdapUnavailableCriticalExtension :: LDAPReturnCode LdapConfidentialityRequired :: LDAPReturnCode LdapSaslBindInProgress :: LDAPReturnCode LdapNoSuchAttribute :: LDAPReturnCode LdapUndefinedType :: LDAPReturnCode LdapInappropriateMatching :: LDAPReturnCode LdapConstraintViolation :: LDAPReturnCode LdapTypeOrValueExists :: LDAPReturnCode LdapInvalidSyntax :: LDAPReturnCode LdapNoSuchObject :: LDAPReturnCode LdapAliasProblem :: LDAPReturnCode LdapInvalidDnSyntax :: LDAPReturnCode LdapIsLeaf :: LDAPReturnCode LdapAliasDerefProblem :: LDAPReturnCode LdapProxyAuthzFailure :: LDAPReturnCode LdapInappropriateAuth :: LDAPReturnCode LdapInvalidCredentials :: LDAPReturnCode LdapInsufficientAccess :: LDAPReturnCode LdapBusy :: LDAPReturnCode LdapUnavailable :: LDAPReturnCode LdapUnwillingToPerform :: LDAPReturnCode LdapLoopDetect :: LDAPReturnCode LdapNamingViolation :: LDAPReturnCode LdapObjectClassViolation :: LDAPReturnCode LdapNotAllowedOnNonleaf :: LDAPReturnCode LdapNotAllowedOnRdn :: LDAPReturnCode LdapAlreadyExists :: LDAPReturnCode LdapNoObjectClassMods :: LDAPReturnCode LdapResultsTooLarge :: LDAPReturnCode LdapAffectsMultipleDsas :: LDAPReturnCode LdapOther :: LDAPReturnCode LdapServerDown :: LDAPReturnCode LdapLocalError :: LDAPReturnCode LdapEncodingError :: LDAPReturnCode LdapDecodingError :: LDAPReturnCode LdapTimeout :: LDAPReturnCode LdapAuthUnknown :: LDAPReturnCode LdapFilterError :: LDAPReturnCode LdapUserCancelled :: LDAPReturnCode LdapParamError :: LDAPReturnCode LdapNoMemory :: LDAPReturnCode LdapConnectError :: LDAPReturnCode LdapNotSupported :: LDAPReturnCode LdapControlNotFound :: LDAPReturnCode LdapNoResultsReturned :: LDAPReturnCode LdapMoreResultsToReturn :: LDAPReturnCode LdapClientLoop :: LDAPReturnCode LdapReferralLimitExceeded :: LDAPReturnCode UnknownLDAPReturnCode :: Int -> LDAPReturnCode data LDAPOptionCode LdapOptApiInfo :: LDAPOptionCode LdapOptDesc :: LDAPOptionCode LdapOptDeref :: LDAPOptionCode LdapOptSizelimit :: LDAPOptionCode LdapOptTimelimit :: LDAPOptionCode LdapOptReferrals :: LDAPOptionCode LdapOptRestart :: LDAPOptionCode LdapOptProtocolVersion :: LDAPOptionCode LdapOptServerControls :: LDAPOptionCode LdapOptClientControls :: LDAPOptionCode LdapOptApiFeatureInfo :: LDAPOptionCode LdapOptHostName :: LDAPOptionCode LdapOptErrorNumber :: LDAPOptionCode LdapOptErrorString :: LDAPOptionCode LdapOptMatchedDn :: LDAPOptionCode LdapOptSuccess :: LDAPOptionCode LdapOptError :: LDAPOptionCode UnknownLDAPOptionCode :: Int -> LDAPOptionCode data LDAPScope LdapScopeDefault :: LDAPScope LdapScopeBase :: LDAPScope LdapScopeOnelevel :: LDAPScope LdapScopeSubtree :: LDAPScope UnknownLDAPScope :: Int -> LDAPScope data LDAPModOp LdapModAdd :: LDAPModOp LdapModDelete :: LDAPModOp LdapModReplace :: LDAPModOp UnknownLDAPModOp :: Int -> LDAPModOp instance Show LDAPModOp instance Show LDAPScope instance Show LDAPOptionCode instance Show LDAPReturnCode instance Eq LDAPModOp instance Ord LDAPModOp instance Enum LDAPModOp instance Eq LDAPScope instance Ord LDAPScope instance Enum LDAPScope instance Eq LDAPOptionCode instance Ord LDAPOptionCode instance Enum LDAPOptionCode instance Eq LDAPReturnCode instance Ord LDAPReturnCode instance Enum LDAPReturnCode -- | Maintainer : jgoerzen@complete.org Stability : provisional -- Portability: portable -- -- Basic types for LDAP programs. -- -- Written by John Goerzen, jgoerzen@complete.org -- -- See also LDAP.Data for types relating to return codes, option -- codes, etc. module LDAP.Types -- | Main LDAP object type. -- -- LDAP objects are automatically unbound (and memory freed) when they -- are garbage-collected by Haskell. type LDAP = ForeignPtr CLDAP -- | Convenience type so we use the correct ints for the LDAP library. type LDAPInt = CInt -- | BER int type type BERInt = Int32 -- | BER type tag type BERTag = Word32 -- | BER length type type BERLen = Word32 -- | Maintainer : jgoerzen@complete.org Stability : provisional -- Portability: portable -- -- Handling LDAP Exceptions -- -- Written by John Goerzen, jgoerzen@complete.org module LDAP.Exceptions -- | The basic type of LDAP exceptions. These are raised when an operation -- does not indicate success. data LDAPException LDAPException :: LDAPReturnCode -> String -> String -> LDAPException -- | Numeric error code code :: LDAPException -> LDAPReturnCode -- | Description of error description :: LDAPException -> String -- | Calling function caller :: LDAPException -> String -- | Execute the given IO action. -- -- If it raises a LDAPException, then execute the supplied handler -- and return its return value. Otherwise, process as normal. catchLDAP :: IO a -> (LDAPException -> IO a) -> IO a -- | Like catchLDAP, with the order of arguments reversed. handleLDAP :: (LDAPException -> IO a) -> IO a -> IO a -- | Catches LDAP errors, and re-raises them as IO errors with fail. Useful -- if you don't care to catch LDAP errors, but want to see a sane error -- message if one happens. One would often use this as a high-level -- wrapper around LDAP calls. failLDAP :: IO a -> IO a -- | A utility function to throw an LDAPException. The mechanics of -- throwing such a thing differ between GHC 6.8.x, Hugs, and GHC 6.10. -- This function takes care of the special cases to make it simpler. -- -- With GHC 6.10, it is a type-restricted alias for throw. On all other -- systems, it is a type-restricted alias for throwDyn. throwLDAP :: LDAPException -> IO a instance Exception LDAPException instance Typeable LDAPException instance Ord LDAPException instance Eq LDAPException instance Show LDAPException -- | Maintainer : jgoerzen@complete.org Stability : provisional -- Portability: portable -- -- LDAP constants for use in your programs -- -- Written by John Goerzen, jgoerzen@complete.org module LDAP.Constants ldapPort :: LDAPInt ldapsPort :: LDAPInt ldapApiVersion :: LDAPInt ldapVendorName :: LDAPInt ldapFilterAnd :: BERTag ldapApiInfoVersion :: LDAPInt ldapFilterOr :: BERTag ldapFeatureInfoVersion :: LDAPInt ldapFilterNot :: BERTag ldapControlValuesreturnfilter :: LDAPInt ldapFilterEquality :: BERTag ldapControlSubentries :: LDAPInt ldapControlNoop :: LDAPInt ldapFilterSubstrings :: BERTag ldapFilterGe :: BERTag ldapControlManagedsait :: LDAPInt ldapFilterLe :: BERTag ldapControlProxyAuthz :: LDAPInt ldapFilterPresent :: BERTag ldapControlSortrequest :: LDAPInt ldapFilterApprox :: BERTag ldapControlSortresponse :: LDAPInt ldapFilterExt :: BERTag ldapControlVlvrequest :: LDAPInt ldapFilterExtOid :: BERTag ldapControlVlvresponse :: LDAPInt ldapFilterExtType :: BERTag ldapNoticeOfDisconnection :: LDAPInt ldapFilterExtValue :: BERTag ldapNoticeDisconnect :: LDAPInt ldapFilterExtDnattrs :: BERTag ldapSubstringAny :: BERTag ldapSubstringFinal :: BERTag ldapSubstringInitial :: BERTag -- | Maintainer : jgoerzen@complete.org Stability : provisional -- Portability: portable -- -- Initialization and shutdown for LDAP programs -- -- Written by John Goerzen, jgoerzen@complete.org module LDAP.Init -- | Like ldapInit, but establish network connection immediately. ldapOpen :: String -> LDAPInt -> IO LDAP -- | Preferred way to initialize a LDAP connection. The default port is -- given in LDAP.Constants.ldapPort. -- -- Could throw IOError on failure. ldapInit :: String -> LDAPInt -> IO LDAP -- | Bind to the remote server. ldapSimpleBind :: LDAP -> String -> String -> IO () -- | Maintainer : jgoerzen@complete.org Stability : provisional -- Portability: portable -- -- LDAP Searching -- -- Written by John Goerzen, jgoerzen@complete.org module LDAP.Search -- | Defines what attributes to return with the search result. data SearchAttributes -- | No attributes LDAPNoAttrs :: SearchAttributes -- | User attributes only LDAPAllUserAttrs :: SearchAttributes -- | User-specified list LDAPAttrList :: [String] -> SearchAttributes data LDAPEntry LDAPEntry :: String -> [(String, [String])] -> LDAPEntry -- | Distinguished Name of this object ledn :: LDAPEntry -> String -- | Mapping from attribute name to values leattrs :: LDAPEntry -> [(String, [String])] data LDAPScope LdapScopeDefault :: LDAPScope LdapScopeBase :: LDAPScope LdapScopeOnelevel :: LDAPScope LdapScopeSubtree :: LDAPScope UnknownLDAPScope :: Int -> LDAPScope ldapSearch :: LDAP -> Maybe String -> LDAPScope -> Maybe String -> SearchAttributes -> Bool -> IO [LDAPEntry] instance Eq LDAPEntry instance Show LDAPEntry instance Eq SearchAttributes instance Show SearchAttributes -- | Maintainer : jgoerzen@complete.org Stability : provisional -- Portability: portable -- -- LDAP changes -- -- Written by John Goerzen, jgoerzen@complete.org module LDAP.Modify data LDAPModOp LdapModAdd :: LDAPModOp LdapModDelete :: LDAPModOp LdapModReplace :: LDAPModOp UnknownLDAPModOp :: Int -> LDAPModOp data LDAPMod LDAPMod :: LDAPModOp -> String -> [String] -> LDAPMod -- | Type of operation to perform modOp :: LDAPMod -> LDAPModOp -- | Name of attribute to edit modType :: LDAPMod -> String -- | New values modVals :: LDAPMod -> [String] ldapAdd :: LDAP -> String -> [LDAPMod] -> IO () ldapModify :: LDAP -> String -> [LDAPMod] -> IO () -- | Delete the specified DN ldapDelete :: LDAP -> String -> IO () -- | Takes a list of name/value points and converts them to LDAPMod -- entries. Each item will have the specified LDAPModOp. list2ldm :: LDAPModOp -> [(String, [String])] -> [LDAPMod] -- | Similar to list2ldm, but handles pairs with only one value. pairs2ldm :: LDAPModOp -> [(String, String)] -> [LDAPMod] instance Eq LDAPMod instance Show LDAPMod -- | Maintainer : jgoerzen@complete.org Stability : provisional -- Portability: portable -- -- Top-level LDAP module. -- -- Written by John Goerzen, jgoerzen@complete.org -- -- Welcome to the LDAP interface for Haskell. Please see one of the -- sections below for more information. -- -- This package comes from: -- -- http://software.complete.org/ldap-haskell module LDAP