package Default
inherited_from \Zend\Authentication\Adapter\AbstractAdapter

 Methods

Constructor

__construct(array $options = array(), string $identity = null, string $credential = null

Parameters

$options

array

An array of arrays of Zend\Ldap\Ldap options

$identity

string

The username of the account being authenticated

$credential

string

The password of the account being authenticated

Authenticate the user

authenticate() : \Zend\Authentication\Result

Exceptions

\Zend\Authentication\Adapter\Exception\ExceptionInterface

Returns

\Zend\Authentication\Result

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

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

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

Parameters

$returnAttribs

array

$omitAttribs

array

Returns

\stdClassboolean

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

getCredential() : mixed
Inherited
inherited_from \Zend\Authentication\Adapter\ValidatableAdapterInterface::getCredential()

Returns

mixed

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

getIdentity() : mixed
Inherited
inherited_from \Zend\Authentication\Adapter\ValidatableAdapterInterface::getIdentity()

Returns

mixed

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

Sets the credential for binding

setCredential(mixed $credential) : \Zend\Authentication\Adapter\AbstractAdapter
Inherited
inherited_from \Zend\Authentication\Adapter\ValidatableAdapterInterface::setCredential()

Parameters

$credential

mixed

Returns

\Zend\Authentication\Adapter\AbstractAdapter

Sets the identity for binding

setIdentity(mixed $identity) : \Zend\Authentication\Adapter\AbstractAdapter
Inherited
inherited_from \Zend\Authentication\Adapter\ValidatableAdapterInterface::setIdentity()

Parameters

$identity

mixed

Returns

\Zend\Authentication\Adapter\AbstractAdapter

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

$ldap

\Zend\Ldap\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\Ldap instance

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

Parameters

$ldap

\Zend\Ldap\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
 

$credential

$credential : mixed

Default

 

$identity

$identity : mixed

Default

 

The Zend\Ldap\Ldap context.

$ldap : \Zend\Ldap\Ldap

Default

null
 

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

$options : array

Default

null