ldap-client-0.1.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. Do not use!

Insecure String

LDAP over TLS without the certificate validity check. Only use for testing!

Secure String

LDAP over TLS. Use!

Instances

data Ldap Source

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

Constructors

Ldap 

Instances

data Async a Source

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

Instances

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

newtype Attr Source

Attribute name.

Constructors

Attr Text 

Instances

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.