Zend Framework  1.12
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Zend_Auth_Adapter_Ldap Class Reference

Public Member Functions

 __construct (array $options=array(), $username=null, $password=null)
 Constructor.
 
 getOptions ()
 Returns the array of arrays of Zend_Ldap options of this adapter.
 
 setOptions ($options)
 Sets the array of arrays of Zend_Ldap options to be used by this adapter.
 
 getUsername ()
 Returns the username of the account being authenticated, or NULL if none is set.
 
 setUsername ($username)
 Sets the username for binding.
 
 getPassword ()
 Returns the password of the account being authenticated, or NULL if none is set.
 
 setPassword ($password)
 Sets the passwort for the account.
 
 setIdentity ($identity)
 setIdentity() - set the identity (username) to be used
 
 setCredential ($credential)
 setCredential() - set the credential (password) value to be used
 
 getLdap ()
 Returns the LDAP Object.
 
 setLdap (Zend_Ldap $ldap)
 Set an Ldap connection.
 
 authenticate ()
 Authenticate the user.
 
 getAccountObject (array $returnAttribs=array(), array $omitAttribs=array())
 getAccountObject() - Returns the result entry as a stdClass object
 

Protected Member Functions

 _getAuthorityName ()
 Returns a domain name for the current LDAP options.
 
 _prepareOptions (Zend_Ldap $ldap, array $options)
 Sets the LDAP specific options on the Zend_Ldap instance.
 
 _checkGroupMembership (Zend_Ldap $ldap, $canonicalName, $dn, array $adapterOptions)
 Checks the group membership of the bound user.
 

Protected Attributes

 $_ldap = null
 
 $_options = null
 
 $_username = null
 
 $_password = null
 
 $_authenticatedDn = null
 

Constructor & Destructor Documentation

__construct ( array  $options = array(),
  $username = null,
  $password = null 
)

Constructor.

Parameters
array$optionsAn array of arrays of Zend_Ldap options
string$usernameThe username of the account being authenticated
string$passwordThe password of the account being authenticated
Returns
void

Member Function Documentation

_checkGroupMembership ( Zend_Ldap  $ldap,
  $canonicalName,
  $dn,
array  $adapterOptions 
)
protected

Checks the group membership of the bound user.

Parameters
Zend_Ldap$ldap
string$canonicalName
string$dn
array$adapterOptions
Returns
string|true
See Also
Zend_Ldap_Filter
_getAuthorityName ( )
protected

Returns a domain name for the current LDAP options.

This is used for skipping redundant operations (e.g. authentications).

Returns
string
_prepareOptions ( Zend_Ldap  $ldap,
array  $options 
)
protected

Sets the LDAP specific options on the Zend_Ldap instance.

Parameters
Zend_Ldap$ldap
array$options
Returns
array of auth-adapter specific options
authenticate ( )
getAccountObject ( array  $returnAttribs = array(),
array  $omitAttribs = array() 
)

getAccountObject() - Returns the result entry as a stdClass object

This resembles the feature {

See Also
Zend_Auth_Adapter_DbTable::getResultRowObject()}. Closes ZF-6813
Parameters
array$returnAttribs
array$omitAttribs
Returns
stdClass|boolean
getLdap ( )

Returns the LDAP Object.

Returns
Zend_Ldap The Zend_Ldap object used to authenticate the credentials
See Also
Zend_Ldap
getOptions ( )

Returns the array of arrays of Zend_Ldap options of this adapter.

Returns
array|null
getPassword ( )

Returns the password of the account being authenticated, or NULL if none is set.

Returns
string|null
getUsername ( )

Returns the username of the account being authenticated, or NULL if none is set.

Returns
string|null
setCredential (   $credential)

setCredential() - set the credential (password) value to be used

Proxies to {

See Also
setPassword()}

Closes ZF-6813

Parameters
string$credential
Returns
Zend_Auth_Adapter_Ldap Provides a fluent interface
setIdentity (   $identity)

setIdentity() - set the identity (username) to be used

Proxies to {

See Also
setUsername()}

Closes ZF-6813

Parameters
string$identity
Returns
Zend_Auth_Adapter_Ldap Provides a fluent interface
setLdap ( Zend_Ldap  $ldap)

Set an Ldap connection.

Parameters
Zend_Ldap$ldapAn existing Ldap object
Returns
Zend_Auth_Adapter_Ldap Provides a fluent interface
setOptions (   $options)

Sets the array of arrays of Zend_Ldap options to be used by this adapter.

Parameters
array$optionsThe array of arrays of Zend_Ldap options
Returns
Zend_Auth_Adapter_Ldap Provides a fluent interface
setPassword (   $password)

Sets the passwort for the account.

Parameters
string$passwordThe password of the account being authenticated
Returns
Zend_Auth_Adapter_Ldap Provides a fluent interface
setUsername (   $username)

Sets the username for binding.

Parameters
string$usernameThe username for binding
Returns
Zend_Auth_Adapter_Ldap Provides a fluent interface

Member Data Documentation

$_authenticatedDn = null
protected
$_ldap = null
protected
$_options = null
protected
$_password = null
protected
$_username = null
protected