Auth/Adapter/Ldap.php

Show: PublicProtectedPrivateinherited
Table of Contents
Zend Framework
LICENSE This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
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

Package: Zend_Auth\Zend_Auth_Adapter
Implements
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

>VPropertyprotectedstring $_authenticatedDn = null
The DN of the authenticated account. Used to retrieve the account entry on request.
Default valuenullDetails
Type
string
>VPropertyprotected\Zend_Ldap $_ldap = null
The Zend_Ldap context.
Default valuenullDetails
Type
\Zend_Ldap
>VPropertyprotectedarray $_options = null
The array of arrays of Zend_Ldap options passed to the constructor.
Default valuenullDetails
Type
array
>VPropertyprotectedstring $_password = null
The password of the account being authenticated.
Default valuenullDetails
Type
string
>VPropertyprotectedstring $_username = null
The username of the account being authenticated.
Default valuenullDetails
Type
string

Methods

methodpublic__construct(array $options = array(), string $username = null, string $password = null) : void

Constructor

Parameters
NameTypeDescription
$optionsarray

An array of arrays of Zend_Ldap options

$usernamestring

The username of the account being authenticated

$passwordstring

The password of the account being authenticated

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

Checks the group membership of the bound user

Parameters
NameTypeDescription
$ldap\Zend_Ldap
$canonicalNamestring
$dnstring
$adapterOptionsarray
Returns
TypeDescription
string | true
methodprotected_getAuthorityName() : string

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

Returns
TypeDescription
string
methodprivate_optionsToString(array $options) : string

Converts options to string

Parameters
NameTypeDescription
$optionsarray
Returns
TypeDescription
string
methodprotected_prepareOptions(\Zend_Ldap $ldap, array $options) : array

Sets the LDAP specific options on the Zend_Ldap instance

Parameters
NameTypeDescription
$ldap\Zend_Ldap
$optionsarray
Returns
TypeDescription
arrayof auth-adapter specific options
methodpublicauthenticate() : \Zend_Auth_Result

Authenticate the user

Returns
TypeDescription
\Zend_Auth_Result
Throws
ExceptionDescription
\Zend_Auth_Adapter_Exception
methodpublicgetAccountObject(array $returnAttribs = array(), array $omitAttribs = array()) : \stdClass | boolean

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

This resembles the feature {@see Zend_Auth_Adapter_DbTable::getResultRowObject()}. Closes ZF-6813
Parameters
NameTypeDescription
$returnAttribsarray
$omitAttribsarray
Returns
TypeDescription
\stdClass | boolean
methodpublicgetLdap() : \Zend_Ldap

Returns the LDAP Object

Returns
TypeDescription
\Zend_LdapThe Zend_Ldap object used to authenticate the credentials
methodpublicgetOptions() : array | null

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

Returns
TypeDescription
array | null
methodpublicgetPassword() : string | null

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

Returns
TypeDescription
string | null
methodpublicgetUsername() : string | null

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

Returns
TypeDescription
string | null
methodpublicsetCredential(string $credential) : \Zend_Auth_Adapter_Ldap

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

Proxies to {@see setPassword()} Closes ZF-6813
Parameters
NameTypeDescription
$credentialstring
Returns
TypeDescription
\Zend_Auth_Adapter_LdapProvides a fluent interface
methodpublicsetIdentity(string $identity) : \Zend_Auth_Adapter_Ldap

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

Proxies to {@see setUsername()} Closes ZF-6813
Parameters
NameTypeDescription
$identitystring
Returns
TypeDescription
\Zend_Auth_Adapter_LdapProvides a fluent interface
methodpublicsetLdap(\Zend_Ldap $ldap) : \Zend_Auth_Adapter_Ldap

Set an Ldap connection

Parameters
NameTypeDescription
$ldap\Zend_Ldap

An existing Ldap object

Returns
TypeDescription
\Zend_Auth_Adapter_LdapProvides a fluent interface
methodpublicsetOptions(array $options) : \Zend_Auth_Adapter_Ldap

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

Parameters
NameTypeDescription
$optionsarray

The array of arrays of Zend_Ldap options

Returns
TypeDescription
\Zend_Auth_Adapter_LdapProvides a fluent interface
methodpublicsetPassword(string $password) : \Zend_Auth_Adapter_Ldap

Sets the passwort for the account

Parameters
NameTypeDescription
$passwordstring

The password of the account being authenticated

Returns
TypeDescription
\Zend_Auth_Adapter_LdapProvides a fluent interface
methodpublicsetUsername(string $username) : \Zend_Auth_Adapter_Ldap

Sets the username for binding

Parameters
NameTypeDescription
$usernamestring

The username for binding

Returns
TypeDescription
\Zend_Auth_Adapter_LdapProvides a fluent interface
Documentation was generated by phpDocumentor 2.2.0 .