KLDAPCore::LdapServer

Search for usage in LXR

KLDAPCore::LdapServer Class Reference

#include <ldapserver.h>

Public Types

using Auth
 
using Security
 
using TLSRequireCertificate
 

Public Member Functions

 LdapServer ()
 
 LdapServer (const LdapServer &other)
 
 LdapServer (const LdapUrl &url)
 
 ~LdapServer ()
 
QStringList activities () const
 
Auth auth () const
 
LdapDN baseDn () const
 
QString bindDn () const
 
void clear ()
 
int completionWeight () const
 
bool enablePlasmaActivities () const
 
QString filter () const
 
QString host () const
 
QString mech () const
 
LdapServeroperator= (const LdapServer &other)
 
int pageSize () const
 
QString password () const
 
int port () const
 
QString realm () const
 
LdapUrl::Scope scope () const
 
Security security () const
 
void setActivities (const QStringList &lst)
 
void setAuth (Auth authentication)
 
void setBaseDn (const LdapDN &baseDn)
 
void setBindDn (const QString &bindDn)
 
void setCompletionWeight (int value)
 
void setEnablePlasmaActivities (bool enabled)
 
void setFilter (const QString &filter)
 
void setHost (const QString &host)
 
void setMech (const QString &mech)
 
void setPageSize (int size)
 
void setPassword (const QString &password)
 
void setPort (int port)
 
void setRealm (const QString &realm)
 
void setScope (LdapUrl::Scope scope)
 
void setSecurity (Security mode)
 
void setSizeLimit (int sizelimit)
 
void setTimeLimit (int limit)
 
void setTimeout (int timeout)
 
void setTLSCACertFile (const QString &caCertFile)
 
void setTLSRequireCertificate (TLSRequireCertificate reqCert)
 
void setUrl (const LdapUrl &url)
 
void setUser (const QString &user)
 
void setVersion (int version)
 
int sizeLimit () const
 
int timeLimit () const
 
int timeout () const
 
QString tlsCACertFile () const
 
TLSRequireCertificate tlsRequireCertificate () const
 
LdapUrl url () const
 
QString user () const
 
int version () const
 

Detailed Description

A class that contains LDAP server connection settings.

This class holds various parameters that are needed to connect to an LDAP server.

Definition at line 26 of file ldapserver.h.

Member Typedef Documentation

◆ Auth

Initial value:
enum {
Anonymous,
Simple,
SASL
}

Describes the authentication method that can be used for the LDAP connection.

Definition at line 71 of file ldapserver.h.

◆ Security

Initial value:
enum {
None,
TLS,
SSL
}

Describes the encryption settings that can be used for the LDAP connection.

Definition at line 61 of file ldapserver.h.

◆ TLSRequireCertificate

Initial value:
enum {
TLSReqCertDefault,
TLSReqCertNever,
TLSReqCertDemand,
TLSReqCertAllow,
TLSReqCertTry,
TLSReqCertHard,
}

Describes the certificate request and check behaviour for TLS/SSL connections.

Definition at line 81 of file ldapserver.h.

Constructor & Destructor Documentation

◆ LdapServer() [1/3]

LdapServer::LdapServer ( )

Creates an empty LDAP server object.

Definition at line 42 of file ldapserver.cpp.

◆ LdapServer() [2/3]

LdapServer::LdapServer ( const LdapUrl & url)
explicit

Creates a new LDAP server object.

Parameters
urlThe LDAP url of the server.

Definition at line 48 of file ldapserver.cpp.

◆ LdapServer() [3/3]

LdapServer::LdapServer ( const LdapServer & other)

Creates a new LDAP server object from an other object.

Definition at line 56 of file ldapserver.cpp.

◆ ~LdapServer()

LdapServer::~LdapServer ( )
default

Destroys the LDAP server object.

Member Function Documentation

◆ activities()

QStringList LdapServer::activities ( ) const
nodiscard

Definition at line 428 of file ldapserver.cpp.

◆ auth()

LdapServer::Auth LdapServer::auth ( ) const
nodiscard

Returns the authentication method of the LDAP connection.

Definition at line 165 of file ldapserver.cpp.

◆ baseDn()

LdapDN LdapServer::baseDn ( ) const
nodiscard

Returns the baseDn of the LDAP connection.

Definition at line 105 of file ldapserver.cpp.

◆ bindDn()

QString LdapServer::bindDn ( ) const
nodiscard

Returns the bindDn of the LDAP connection.

Definition at line 115 of file ldapserver.cpp.

◆ clear()

void LdapServer::clear ( )

Clears all server settings.

Definition at line 75 of file ldapserver.cpp.

◆ completionWeight()

int LdapServer::completionWeight ( ) const
nodiscard

Definition at line 418 of file ldapserver.cpp.

◆ enablePlasmaActivities()

bool LdapServer::enablePlasmaActivities ( ) const
nodiscard

Definition at line 438 of file ldapserver.cpp.

◆ filter()

QString LdapServer::filter ( ) const
nodiscard

Returns the filter string of the LDAP connection.

Definition at line 130 of file ldapserver.cpp.

◆ host()

QString LdapServer::host ( ) const
nodiscard

Returns the host of the LDAP connection.

Definition at line 95 of file ldapserver.cpp.

◆ mech()

QString LdapServer::mech ( ) const
nodiscard

Returns the mech of the LDAP connection.

Definition at line 180 of file ldapserver.cpp.

◆ operator=()

LdapServer & LdapServer::operator= ( const LdapServer & other)

Overwrites the values of the LDAP server object with the values from an other object.

Definition at line 62 of file ldapserver.cpp.

◆ pageSize()

int LdapServer::pageSize ( ) const
nodiscard

Returns the page size of the LDAP connection.

Definition at line 150 of file ldapserver.cpp.

◆ password()

QString LdapServer::password ( ) const
nodiscard

Returns the password of the LDAP connection.

Definition at line 125 of file ldapserver.cpp.

◆ port()

int LdapServer::port ( ) const
nodiscard

Returns the port of the LDAP connection.

Definition at line 100 of file ldapserver.cpp.

◆ realm()

QString LdapServer::realm ( ) const
nodiscard

Returns the realm of the LDAP connection.

Definition at line 120 of file ldapserver.cpp.

◆ scope()

LdapUrl::Scope LdapServer::scope ( ) const
nodiscard

Returns the search scope of the LDAP connection.

Definition at line 135 of file ldapserver.cpp.

◆ security()

LdapServer::Security LdapServer::security ( ) const
nodiscard

Returns the security mode of the LDAP connection.

Definition at line 160 of file ldapserver.cpp.

◆ setActivities()

void LdapServer::setActivities ( const QStringList & lst)

Definition at line 423 of file ldapserver.cpp.

◆ setAuth()

void LdapServer::setAuth ( Auth authentication)

Sets the authentication method of the LDAP connection.

If no authentication method is set, Anonymous is used as default.

Parameters
authenticationthe authentication method to set

Definition at line 260 of file ldapserver.cpp.

◆ setBaseDn()

void LdapServer::setBaseDn ( const LdapDN & baseDn)

Sets the baseDn of the LDAP connection.

Definition at line 200 of file ldapserver.cpp.

◆ setBindDn()

void LdapServer::setBindDn ( const QString & bindDn)

Sets the bindDn of the LDAP connection.

Definition at line 210 of file ldapserver.cpp.

◆ setCompletionWeight()

void LdapServer::setCompletionWeight ( int value)

Definition at line 413 of file ldapserver.cpp.

◆ setEnablePlasmaActivities()

void LdapServer::setEnablePlasmaActivities ( bool enabled)

Definition at line 433 of file ldapserver.cpp.

◆ setFilter()

void LdapServer::setFilter ( const QString & filter)

Sets the filter string of the LDAP connection.

Definition at line 240 of file ldapserver.cpp.

◆ setHost()

void LdapServer::setHost ( const QString & host)

Sets the host of the LDAP connection.

Definition at line 190 of file ldapserver.cpp.

◆ setMech()

void LdapServer::setMech ( const QString & mech)

Sets the mech of the LDAP connection.

Definition at line 275 of file ldapserver.cpp.

◆ setPageSize()

void LdapServer::setPageSize ( int size)

Sets the page size of the LDAP connection.

Definition at line 235 of file ldapserver.cpp.

◆ setPassword()

void LdapServer::setPassword ( const QString & password)

Sets the password of the LDAP connection.

Definition at line 220 of file ldapserver.cpp.

◆ setPort()

void LdapServer::setPort ( int port)

Sets the port of the LDAP connection.

If not port is set, 389 is used as default.

Parameters
portthe LDAP port connection to set

Definition at line 195 of file ldapserver.cpp.

◆ setRealm()

void LdapServer::setRealm ( const QString & realm)

Sets the realm of the LDAP connection.

Definition at line 215 of file ldapserver.cpp.

◆ setScope()

void LdapServer::setScope ( LdapUrl::Scope scope)

Sets the search scope of the LDAP connection.

Definition at line 245 of file ldapserver.cpp.

◆ setSecurity()

void LdapServer::setSecurity ( Security mode)

Sets the security mode of the LDAP connection.

If no security is set, None is used as default.

Parameters
modethe security mode to set

Definition at line 255 of file ldapserver.cpp.

◆ setSizeLimit()

void LdapServer::setSizeLimit ( int sizelimit)

Sets the size limit of the LDAP connection.

Definition at line 230 of file ldapserver.cpp.

◆ setTimeLimit()

void LdapServer::setTimeLimit ( int limit)

Sets the time limit of the LDAP connection.

Definition at line 225 of file ldapserver.cpp.

◆ setTimeout()

void LdapServer::setTimeout ( int timeout)

Sets the timeout of the LDAP connection.

Definition at line 280 of file ldapserver.cpp.

◆ setTLSCACertFile()

void LdapServer::setTLSCACertFile ( const QString & caCertFile)

Sets the CA certificate file for TLS/SSL connections.

Definition at line 270 of file ldapserver.cpp.

◆ setTLSRequireCertificate()

void LdapServer::setTLSRequireCertificate ( LdapServer::TLSRequireCertificate reqCert)

Sets the certificate require mode for TLS/SSL connections.

Definition at line 265 of file ldapserver.cpp.

◆ setUrl()

void LdapServer::setUrl ( const LdapUrl & url)

Sets the server parameters from an RFC2255 compliant LDAP url.

Definition at line 285 of file ldapserver.cpp.

◆ setUser()

void LdapServer::setUser ( const QString & user)

Sets the user of the LDAP connection.

Definition at line 205 of file ldapserver.cpp.

◆ setVersion()

void LdapServer::setVersion ( int version)

Sets the protocol version of the LDAP connection.

If no version is set, 3 is used as default.

Parameters
versionthe protocol version to set

Definition at line 250 of file ldapserver.cpp.

◆ sizeLimit()

int LdapServer::sizeLimit ( ) const
nodiscard

Returns the size limit of the LDAP connection.

Definition at line 145 of file ldapserver.cpp.

◆ timeLimit()

int LdapServer::timeLimit ( ) const
nodiscard

Returns the time limit of the LDAP connection.

Definition at line 140 of file ldapserver.cpp.

◆ timeout()

int LdapServer::timeout ( ) const
nodiscard

Returns the timeout of the LDAP connection.

Definition at line 185 of file ldapserver.cpp.

◆ tlsCACertFile()

QString LdapServer::tlsCACertFile ( ) const
nodiscard

Returns the CA certificate file used for TLS/SSL connections.

Definition at line 175 of file ldapserver.cpp.

◆ tlsRequireCertificate()

LdapServer::TLSRequireCertificate LdapServer::tlsRequireCertificate ( ) const
nodiscard

Returns the certificate require mode for TLS/SSL connections.

Definition at line 170 of file ldapserver.cpp.

◆ url()

LdapUrl LdapServer::url ( ) const
nodiscard

Returns the server parameters as an RFC2255 compliant LDAP Url.

The URL extensions which are supported: Standard: bindname KLDAP extensions: x-tls, x-version, x-sasl, x-mech, x-realm, x-sizelimit, x-timelimit, x-pagesize, x-timeout

Definition at line 368 of file ldapserver.cpp.

◆ user()

QString LdapServer::user ( ) const
nodiscard

Returns the user of the LDAP connection.

Definition at line 110 of file ldapserver.cpp.

◆ version()

int LdapServer::version ( ) const
nodiscard

Returns the protocol version of the LDAP connection.

Definition at line 155 of file ldapserver.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:34:09 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.