ldap-client-0.4.0: Pure Haskell LDAP Client Library

Safe HaskellNone
LanguageHaskell2010

Ldap.Client.Internal

Contents

Synopsis

Documentation

data Host Source #

LDAP host.

Constructors

Plain String

Plain LDAP.

Tls String TLSSettings

LDAP over TLS.

Instances
Show Host Source # 
Instance details

Defined in Ldap.Client.Internal

Methods

showsPrec :: Int -> Host -> ShowS #

show :: Host -> String #

showList :: [Host] -> ShowS #

data PortNumber #

Port number. Use the Num instance (i.e. use a literal) to create a PortNumber value.

>>> 1 :: PortNumber
1
>>> read "1" :: PortNumber
1
>>> show (12345 :: PortNumber)
"12345"
>>> 50000 < (51000 :: PortNumber)
True
>>> 50000 < (52000 :: PortNumber)
True
>>> 50000 + (10000 :: PortNumber)
60000
Instances
Enum PortNumber 
Instance details

Defined in Network.Socket.Types

Eq PortNumber 
Instance details

Defined in Network.Socket.Types

Integral PortNumber 
Instance details

Defined in Network.Socket.Types

Num PortNumber 
Instance details

Defined in Network.Socket.Types

Ord PortNumber 
Instance details

Defined in Network.Socket.Types

Read PortNumber 
Instance details

Defined in Network.Socket.Types

Real PortNumber 
Instance details

Defined in Network.Socket.Types

Show PortNumber 
Instance details

Defined in Network.Socket.Types

Storable PortNumber 
Instance details

Defined in Network.Socket.Types

data Ldap Source #

An LDAP connection handle

Constructors

Ldap 

Fields

data Async a Source #

Asynchronous LDAP operation. Use wait or waitSTM to wait for its completion.

Instances
Functor Async Source # 
Instance details

Defined in Ldap.Client.Internal

Methods

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

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

type AttrList f = [(Attr, f AttrValue)] Source #

List of attributes and their values. f is the structure these values are in, e.g. NonEmpty.

Waiting for Request Completion

wait :: Async a -> IO (Either ResponseError a) Source #

Wait for operation completion.

waitSTM :: Async a -> STM (Either ResponseError a) Source #

Wait for operation completion inside STM.

Do not use this inside the same STM transaction the operation was requested in! To give LDAP the chance to respond to it that transaction should commit. After that, applying waitSTM to the corresponding Async starts to make sense.

Misc

type Response = NonEmpty InMessage Source #

data ResponseError Source #

Response indicates a failed operation.

Constructors

ResponseInvalid !Request !Response

LDAP server did not follow the protocol, so ldap-client couldn't make sense of the response.

ResponseErrorCode !Request !ResultCode !Dn !Text

The response contains a result code indicating failure and an error message.

newtype Dn Source #

Unique identifier of an LDAP entry.

Constructors

Dn Text 
Instances
Eq Dn Source # 
Instance details

Defined in Ldap.Client.Internal

Methods

(==) :: Dn -> Dn -> Bool #

(/=) :: Dn -> Dn -> Bool #

Show Dn Source # 
Instance details

Defined in Ldap.Client.Internal

Methods

showsPrec :: Int -> Dn -> ShowS #

show :: Dn -> String #

showList :: [Dn] -> ShowS #

newtype Attr Source #

Attribute name.

Constructors

Attr Text 
Instances
Eq Attr Source # 
Instance details

Defined in Ldap.Client.Internal

Methods

(==) :: Attr -> Attr -> Bool #

(/=) :: Attr -> Attr -> Bool #

Show Attr Source # 
Instance details

Defined in Ldap.Client.Internal

Methods

showsPrec :: Int -> Attr -> ShowS #

show :: Attr -> String #

showList :: [Attr] -> ShowS #

type AttrValue = ByteString Source #

Attribute value.

Unbind operation

unbindAsync :: Ldap -> IO () Source #

Terminate the connection to the Directory.

Note that unbindAsync does not return an Async, because LDAP server never responds to UnbindRequests, hence a call to wait on a hypothetical Async would have resulted in an exception anyway.

unbindAsyncSTM :: Ldap -> STM () Source #

Terminate the connection to the Directory.

Note that unbindAsyncSTM does not return an Async, because LDAP server never responds to UnbindRequests, hence a call to wait on a hypothetical Async would have resulted in an exception anyway.