category Zend
package Zend_Auth
subpackage Zend_Auth_Adapter
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License

 Methods

Constructor

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

Parameters

$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

Authenticate the user

authenticate() : \Zend_Auth_Result
inherited_from \Zend_Auth_Adapter_Interface::authenticate()

Exceptions

\Zend_Auth_Adapter_Exception

Returns

\Zend_Auth_Result

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

getAccountObject(array $returnAttribs = array(), array $omitAttribs = array()) : \stdClass | boolean

This resembles the feature \Zend_Auth_Adapter_DbTable::getResultRowObject(). Closes ZF-6813

Parameters

$returnAttribs

array

$omitAttribs

array

Returns

\stdClassboolean

Returns the LDAP Object

getLdap() : \Zend_Ldap

Returns

\Zend_LdapThe Zend_Ldap object used to authenticate the credentials

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

getOptions() : array | null

Returns

arraynull

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

getPassword() : string | null

Returns

stringnull

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

getUsername() : string | null

Returns

stringnull

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

setCredential(string $credential) : \Zend_Auth_Adapter_Ldap

Proxies to \setPassword()

Closes ZF-6813

Parameters

$credential

string

Returns

\Zend_Auth_Adapter_LdapProvides a fluent interface

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

setIdentity(string $identity) : \Zend_Auth_Adapter_Ldap

Proxies to \setUsername()

Closes ZF-6813

Parameters

$identity

string

Returns

\Zend_Auth_Adapter_LdapProvides a fluent interface

Set an Ldap connection

setLdap(\Zend_Ldap $ldap) : \Zend_Auth_Adapter_Ldap

Parameters

$ldap

\Zend_Ldap

An existing Ldap object

Returns

\Zend_Auth_Adapter_LdapProvides a fluent interface

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

setOptions(array $options) : \Zend_Auth_Adapter_Ldap

Parameters

$options

array

The array of arrays of Zend_Ldap options

Returns

\Zend_Auth_Adapter_LdapProvides a fluent interface

Sets the passwort for the account

setPassword(string $password) : \Zend_Auth_Adapter_Ldap

Parameters

$password

string

The password of the account being authenticated

Returns

\Zend_Auth_Adapter_LdapProvides a fluent interface

Sets the username for binding

setUsername(string $username) : \Zend_Auth_Adapter_Ldap

Parameters

$username

string

The username for binding

Returns

\Zend_Auth_Adapter_LdapProvides a fluent interface

Checks the group membership of the bound user

_checkGroupMembership(\Zend_Ldap $ldap, string $canonicalName, string $dn, array $adapterOptions) : string | true

Parameters

$ldap

\Zend_Ldap

$canonicalName

string

$dn

string

$adapterOptions

array

Returns

stringtrue

Returns a domain name for the current LDAP options. This is used for skipping redundant operations (e.g. authentications).

_getAuthorityName() : string

Returns

string

Sets the LDAP specific options on the Zend_Ldap instance

_prepareOptions(\Zend_Ldap $ldap, array $options) : array

Parameters

$ldap

\Zend_Ldap

$options

array

Returns

arrayof auth-adapter specific options

Converts options to string

_optionsToString(array $options) : string

Parameters

$options

array

Returns

string

 Properties

 

The DN of the authenticated account. Used to retrieve the account entry on request.

$_authenticatedDn : string

Default

null
 

The Zend_Ldap context.

$_ldap : \Zend_Ldap

Default

null
 

The array of arrays of Zend_Ldap options passed to the constructor.

$_options : array

Default

null
 

The password of the account being authenticated.

$_password : string

Default

null
 

The username of the account being authenticated.

$_username : string

Default

null