ldap-client-og-0.3.0: Pure Haskell LDAP Client Library
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ldap.Client.Internal

Synopsis

Documentation

data Host Source #

LDAP host.

Constructors

Plain String

Plain LDAP.

Tls String TLSSettings

LDAP over TLS.

Instances

Instances details
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

Instances details
Storable PortNumber 
Instance details

Defined in Network.Socket.Types

Bounded PortNumber 
Instance details

Defined in Network.Socket.Types

Enum PortNumber 
Instance details

Defined in Network.Socket.Types

Num PortNumber 
Instance details

Defined in Network.Socket.Types

Read PortNumber 
Instance details

Defined in Network.Socket.Types

Integral 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

Eq PortNumber 
Instance details

Defined in Network.Socket.Types

Ord PortNumber 
Instance details

Defined in Network.Socket.Types

newtype Ldap Source #

A token. All functions that interact with the Directory require one.

Constructors

Ldap 

Instances

Instances details
Eq Ldap Source # 
Instance details

Defined in Ldap.Client.Internal

Methods

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

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

data Async a Source #

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

Instances

Instances details
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.

raise :: Exception e => Either e a -> IO a Source #

newtype Dn Source #

Unique identifier of an LDAP entry.

Constructors

Dn Text 

Instances

Instances details
Show Dn Source # 
Instance details

Defined in Ldap.Client.Internal

Methods

showsPrec :: Int -> Dn -> ShowS #

show :: Dn -> String #

showList :: [Dn] -> ShowS #

Eq Dn Source # 
Instance details

Defined in Ldap.Client.Internal

Methods

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

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

newtype Attr Source #

Attribute name.

Constructors

Attr Text 

Instances

Instances details
Show Attr Source # 
Instance details

Defined in Ldap.Client.Internal

Methods

showsPrec :: Int -> Attr -> ShowS #

show :: Attr -> String #

showList :: [Attr] -> ShowS #

Eq Attr Source # 
Instance details

Defined in Ldap.Client.Internal

Methods

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

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

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.