Inherits from NSObject
Conforms to NSCopying
Declared in LKUrl.h
LKUrl.m

Overview

LKUrl is a convience class for parsing an LDAP URL into its componets.

LDAP URLs have the following format:

ldap://hostport/dn[?attrs[?scope[?filter[?exts]]]]

Where:

  • hostport is a host name with an optional “:portnumber”.
  • dn is the search base DN.
  • attrs is a comma separated list of attributes to request.
  • scope is the scope of the request (“one”, “sub”, or “base”).
  • filter is the search filter of the request.
  • exts is recognized set of LDAP and/or API extensions.

Example:

ldap://ldap.example.net/dc=example,dc=net?cn,sn?sub?(cn=*)

See RFC 4516 and the ldap_url man page for more information.

Tasks

Object Management Methods

URL Componets

Properties

ldapAttributes

A list of attributes to request.

@property (atomic, copy) NSArray *ldapAttributes

Declared In

LKUrl.h

ldapConnectionUrl

The LDAP URL used calls to ldap_initialize().

@property (atomic, copy, readonly) NSString *ldapConnectionUrl

Declared In

LKUrl.h

ldapCriticalExtensions

True if any extension is critical.

@property (atomic, assign) BOOL ldapCriticalExtensions

Declared In

LKUrl.h

ldapDn

The search base DN.

@property (atomic, copy) NSString *ldapDn

Declared In

LKUrl.h

ldapExtensions

Recognized set of LDAP and/or API extensions.

@property (atomic, copy) NSArray *ldapExtensions

Declared In

LKUrl.h

ldapFilter

The LDAP filter.

@property (atomic, copy) NSString *ldapFilter

Declared In

LKUrl.h

ldapHost

The hostname contained within the URL.

@property (atomic, copy) NSString *ldapHost

Declared In

LKUrl.h

ldapPort

The port number contained within the URL.

@property (atomic, assign) NSInteger ldapPort

Declared In

LKUrl.h

ldapScheme

The LDAP scheme used in the URL.

@property (atomic, assign) LKLdapProtocolScheme ldapScheme

Declared In

LKUrl.h

ldapScope

A scope of the search request.

@property (atomic, assign) LKLdapSearchScope ldapScope

Declared In

LKUrl.h

ldapUrl

The LDAP URL that has been parsed into component pieces.

@property (atomic, copy) NSString *ldapUrl

Declared In

LKUrl.h

Class Methods

testLdapURI:

Tests the syntax of the provided URL.

+ (BOOL)testLdapURI:(NSString *)uri

Parameters

uri

The LDAP URL to test.

Return Value

Returns TRUE if the URL is a valid LDAP URL or FALSE if the URL is not a valid LDAP URL.

Declared In

LKUrl.h

urlWithURI:

Creates a new object with values from a URL.

+ (id)urlWithURI:(NSString *)uri

Parameters

uri

The URL used to populate internal values.

Declared In

LKUrl.h

Instance Methods

init

Initialize a new object with default values.

- (id)init

Declared In

LKUrl.h

initWithURI:

Initialize a new object with values from a URL.

- (id)initWithURI:(NSString *)uri

Parameters

uri

The URL used to populate internal values.

Declared In

LKUrl.h