Class for LDAP support. More...
#include <ldapmodule.h>
Public Member Functions | |
LDAPModule () | |
Constructor. | |
virtual | ~LDAPModule () |
Destructor. | |
void | connect (const KockpitAuthObj &authobj) |
Establish LDAP conection. | |
void | bind (KockpitAuthObj &authobj) |
Make a bind. | |
void | reset (KockpitAuthObj &authobj) |
Reset connection. | |
void | disconnect () |
Destroy existing connection. | |
void | build (QList< KockpitUnitMap * > *kuml, const KockpitBaseObj &baseobj) |
Build kockpit units. | |
void | createEntry (KockpitUnitMap *kunit) |
Create backend entry. | |
void | deleteEntry (KockpitUnitMap *kunit) |
Delete backend entry. | |
void | modifyEntry (KockpitUnitMap *kunit) |
Modify backend entry. | |
Q_INVOKABLE QStringList | getAttrs (const QString &base, const QString &attr) |
Script access. | |
Private Attributes | |
LDAPConnection * | conn |
LDAP connection. |
Class for LDAP support.
This class is needed for LDAP support for kockpit.
LDAPModule::LDAPModule | ( | ) |
Constructor.
Connection is initialized with NULL.
virtual LDAPModule::~LDAPModule | ( | ) | [inline, virtual] |
Destructor.
void LDAPModule::bind | ( | KockpitAuthObj & | authobj | ) |
Make a bind.
This function is used to authenticate users against the LDAP backend.
authobj | This structure specfifies the connection parameters. |
void LDAPModule::build | ( | QList< KockpitUnitMap * > * | kuml, | |
const KockpitBaseObj & | baseobj | |||
) | [virtual] |
Build kockpit units.
In dependency of the type which is specified in the basobj structure objects will be created and filled with the datasource attribute values.
kuml | pointer to List of pointers to KockpitUnitMap objects (could be KockpitUser or KockpitGroup objects. | |
baseobj | This structure specifies the type of the object which should be filled with attribute values. |
Implements KockpitModule.
void LDAPModule::connect | ( | const KockpitAuthObj & | authobj | ) | [virtual] |
Establish LDAP conection.
With this function a connection to the LDAP directory specified with authobj is esablished.
authobj | This structure specfifies the connection parameters. |
Implements KockpitModule.
void LDAPModule::createEntry | ( | KockpitUnitMap * | kunit | ) | [virtual] |
Create backend entry.
This function creates an entry in the backend. The backend attributes are determined by the AttributeMaps.
kunit | Pointer to KockpitUnitMap. |
Implements KockpitModule.
void LDAPModule::deleteEntry | ( | KockpitUnitMap * | kunit | ) | [virtual] |
Delete backend entry.
This function deletes an entry from the backend. The backend attributes are determined by the AttributeMaps.
kunit | Pointer to KockpitUnitMap. |
Implements KockpitModule.
void LDAPModule::disconnect | ( | ) | [virtual] |
Destroy existing connection.
Implements KockpitModule.
QStringList LDAPModule::getAttrs | ( | const QString & | base, | |
const QString & | attr | |||
) |
Script access.
This function is invoked by a js script - its the only interface for this task.
base | LDAP Base. | |
attr | Attributes to scan after in LDAP directory. |
void LDAPModule::modifyEntry | ( | KockpitUnitMap * | kunit | ) | [virtual] |
Modify backend entry.
This function modifies an entry in the backend. The backend attributes are determined by the AttributeMaps.
kunit | Pointer to KockpitUnitMap. |
Implements KockpitModule.
void LDAPModule::reset | ( | KockpitAuthObj & | authobj | ) |
Reset connection.
This function is used to reset the connection, to make it possible to login again.
authobj | This structure specfifies the connection parameters. |
LDAPConnection* LDAPModule::conn [private] |
LDAP connection.