category Zend
package Zend_Authentication
subpackage Adapter

 Methods

Constructor

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

Parameters

$options

array

An array of arrays of Zend\Ldap\Ldap options

$username

string

The username of the account being authenticated

$password

string

The password of the account being authenticated

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

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

This resembles the feature {@see Zend\Authentication\Adapter\DbTable::getResultRowObject()}. Closes ZF-6813

Parameters

$returnAttribs

array

$omitAttribs

array

Returns

\stdClassbool

Returns the LDAP Object

getLdap() : \Zend\Ldap\Ldap

Returns

\Zend\Ldap\LdapThe Zend\Ldap\Ldap object used to authenticate the credentials

Returns the array of arrays of Zend\Ldap\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\Authentication\Adapter\Ldap

Proxies to {@see setPassword()}

Closes ZF-6813

Parameters

$credential

string

Returns

\Zend\Authentication\Adapter\LdapProvides a fluent interface

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

setIdentity(string $identity) : \Zend\Authentication\Adapter\Ldap

Proxies to {@see setUsername()}

Closes ZF-6813

Parameters

$identity

string

Returns

\Zend\Authentication\Adapter\LdapProvides a fluent interface

Set an Ldap connection

setLdap(\Zend\Ldap\Ldap $ldap) : \Zend\Authentication\Adapter\Ldap

Parameters

$ldap

\Zend\Ldap\Ldap

An existing Ldap object

Returns

\Zend\Authentication\Adapter\LdapProvides a fluent interface

Sets the array of arrays of Zend\Ldap\Ldap options to be used by this adapter.

setOptions(array $options) : \Zend\Authentication\Adapter\Ldap

Parameters

$options

array

The array of arrays of Zend\Ldap\Ldap options

Returns

\Zend\Authentication\Adapter\LdapProvides a fluent interface

Sets the password for the account

setPassword(string $password) : \Zend\Authentication\Adapter\Ldap

Parameters

$password

string

The password of the account being authenticated

Returns

\Zend\Authentication\Adapter\LdapProvides a fluent interface

Sets the username for binding

setUsername(string $username) : \Zend\Authentication\Adapter\Ldap

Parameters

$username

string

The username for binding

Returns

\Zend\Authentication\Adapter\LdapProvides a fluent interface

Checks the group membership of the bound user

checkGroupMembership(\Zend\Ldap\Ldap $ldap, string $canonicalName, string $dn, array $adapterOptions) : string | true

Parameters

$canonicalName

string

$dn

string

$adapterOptions

array

Returns

stringtrue

Returns a domain name for the current LDAP options.

getAuthorityName() : string

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

Returns

string

Sets the LDAP specific options on the Zend\Ldap\Ldap instance

prepareOptions(\Zend\Ldap\Ldap $ldap, array $options) : array

Parameters

$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.

$authenticatedDn : string

Used to retrieve the account entry on request.

 

The Zend\Ldap\Ldap context.

$ldap : \Zend\Ldap\Ldap

 

The array of arrays of Zend\Ldap\Ldap options passed to the constructor.

$options : array

 

The password of the account being authenticated.

$password : string

 

The username of the account being authenticated.

$username : string