Auth/Adapter/Ldap.php
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Auth
- Subpackage
- Zend_Auth_Adapter
- Version
- $Id$
\Zend_Auth_Adapter_Ldap
- Implements
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties

string $_authenticatedDn = nullnullDetails- Type
- string

array $_options = nullnullDetails- Type
- array

string $_password = nullnullDetails- Type
- string
Methods

__construct(array $options = array(), string $username = null, string $password = null) : voidConstructor
| Name | Type | Description |
|---|---|---|
| $options | array | An array of arrays of Zend_Ldap options |
| $username | string | The username of the account being authenticated |
| $password | string | The password of the account being authenticated |

_checkGroupMembership(\Zend_Ldap $ldap, string $canonicalName, string $dn, array $adapterOptions) : string | trueChecks the group membership of the bound user
| Name | Type | Description |
|---|---|---|
| $ldap | \Zend_Ldap | |
| $canonicalName | string | |
| $dn | string | |
| $adapterOptions | array |
| Type | Description |
|---|---|
| string | true |

_getAuthorityName() : stringReturns a domain name for the current LDAP options. This is used for skipping redundant operations (e.g. authentications).
| Type | Description |
|---|---|
| string |

_optionsToString(array $options) : stringConverts options to string
| Name | Type | Description |
|---|---|---|
| $options | array |
| Type | Description |
|---|---|
| string |

_prepareOptions(\Zend_Ldap $ldap, array $options) : arraySets the LDAP specific options on the Zend_Ldap instance
| Name | Type | Description |
|---|---|---|
| $ldap | \Zend_Ldap | |
| $options | array |
| Type | Description |
|---|---|
| array | of auth-adapter specific options |

authenticate() : \Zend_Auth_ResultAuthenticate the user
| Type | Description |
|---|---|
| \Zend_Auth_Result |
| Exception | Description |
|---|---|
| \Zend_Auth_Adapter_Exception |

getAccountObject(array $returnAttribs = array(), array $omitAttribs = array()) : \stdClass | booleangetAccountObject() - Returns the result entry as a stdClass object
| Name | Type | Description |
|---|---|---|
| $returnAttribs | array | |
| $omitAttribs | array |
| Type | Description |
|---|---|
| \stdClass | boolean |

getLdap() : \Zend_LdapReturns the LDAP Object
| Type | Description |
|---|---|
| \Zend_Ldap | The Zend_Ldap object used to authenticate the credentials |

getOptions() : array | nullReturns the array of arrays of Zend_Ldap options of this adapter.
| Type | Description |
|---|---|
| array | null |

getPassword() : string | nullReturns the password of the account being authenticated, or NULL if none is set.
| Type | Description |
|---|---|
| string | null |

getUsername() : string | nullReturns the username of the account being authenticated, or NULL if none is set.
| Type | Description |
|---|---|
| string | null |

setCredential(string $credential) : \Zend_Auth_Adapter_LdapsetCredential() - set the credential (password) value to be used
| Name | Type | Description |
|---|---|---|
| $credential | string |
| Type | Description |
|---|---|
| \Zend_Auth_Adapter_Ldap | Provides a fluent interface |

setIdentity(string $identity) : \Zend_Auth_Adapter_LdapsetIdentity() - set the identity (username) to be used
| Name | Type | Description |
|---|---|---|
| $identity | string |
| Type | Description |
|---|---|
| \Zend_Auth_Adapter_Ldap | Provides a fluent interface |

setLdap(\Zend_Ldap $ldap) : \Zend_Auth_Adapter_LdapSet an Ldap connection
| Name | Type | Description |
|---|---|---|
| $ldap | \Zend_Ldap | An existing Ldap object |
| Type | Description |
|---|---|
| \Zend_Auth_Adapter_Ldap | Provides a fluent interface |

setOptions(array $options) : \Zend_Auth_Adapter_LdapSets the array of arrays of Zend_Ldap options to be used by this adapter.
| Name | Type | Description |
|---|---|---|
| $options | array | The array of arrays of Zend_Ldap options |
| Type | Description |
|---|---|
| \Zend_Auth_Adapter_Ldap | Provides a fluent interface |

setPassword(string $password) : \Zend_Auth_Adapter_LdapSets the passwort for the account
| Name | Type | Description |
|---|---|---|
| $password | string | The password of the account being authenticated |
| Type | Description |
|---|---|
| \Zend_Auth_Adapter_Ldap | Provides a fluent interface |

setUsername(string $username) : \Zend_Auth_Adapter_LdapSets the username for binding
| Name | Type | Description |
|---|---|---|
| $username | string | The username for binding |
| Type | Description |
|---|---|
| \Zend_Auth_Adapter_Ldap | Provides a fluent interface |