Qore openldap Module 1.3.0
Loading...
Searching...
No Matches
LdapDn Class Reference

Represents a parsed LDAP Distinguished Name. More...

#include <LdapHelper.qm.dox.h>

Public Member Methods

void constructor (string dn)
 Creates a new LdapDn from a DN string.
 
string getRdn ()
 Returns the Relative Distinguished Name (first component)
 
string getParent ()
 Returns the parent DN.
 
string getRdnValue ()
 Returns the value of the RDN.
 
string getRdnType ()
 Returns the type of the RDN.
 
bool isChildOf (string parent)
 Checks if this DN is a child of another DN.
 
string toString ()
 Returns the string representation.
 

Public Attributes

string dn
 The full DN string.
 

Detailed Description

Represents a parsed LDAP Distinguished Name.

Note
This is a simple DN parser that handles basic DNs with comma-separated components. It does NOT handle escaped characters according to RFC 4514. DNs containing escaped commas (e.g., "CN=Smith\\, John,OU=Users,DC=example,DC=com") will not be parsed correctly. For such cases, use the raw DN string directly or implement custom parsing logic.

Member Function Documentation

◆ constructor()

void LdapDn::constructor ( string  dn)

Creates a new LdapDn from a DN string.

Parameters
dnthe distinguished name string

◆ getParent()

string LdapDn::getParent ( )

Returns the parent DN.

Returns
the parent DN string

◆ getRdn()

string LdapDn::getRdn ( )

Returns the Relative Distinguished Name (first component)

Returns
the RDN string (e.g., "uid=testuser")

◆ getRdnType()

string LdapDn::getRdnType ( )

Returns the type of the RDN.

Returns
the RDN type (e.g., "uid" from "uid=testuser")

◆ getRdnValue()

string LdapDn::getRdnValue ( )

Returns the value of the RDN.

Returns
the RDN value (e.g., "testuser" from "uid=testuser")

◆ isChildOf()

bool LdapDn::isChildOf ( string  parent)

Checks if this DN is a child of another DN.

Parameters
parentthe potential parent DN
Returns
True if this DN is a child of parent

The documentation for this class was generated from the following file: