39. Class

39.1. Zend\Authentication\Adapter\Ldap

39.1.1. Methods

39.1.1.1. __construct

__construct()

Constructor

Parameters:
  • array – An array of arrays of ZendLdapLdap options
  • string – The username of the account being authenticated
  • string – The password of the account being authenticated

39.1.1.2. getOptions

getOptions()

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

Return type:array|null

39.1.1.3. setOptions

setOptions()

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

Parameters:array – The array of arrays of ZendLdapLdap options
Return type:Ldap Provides a fluent interface

39.1.1.4. getUsername

getUsername()

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

Return type:string|null

39.1.1.5. setUsername

setUsername()

Sets the username for binding

Parameters:string – The username for binding
Return type:Ldap Provides a fluent interface

39.1.1.6. getPassword

getPassword()

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

Return type:string|null

39.1.1.7. setPassword

setPassword()

Sets the password for the account

Parameters:string – The password of the account being authenticated
Return type:Ldap Provides a fluent interface

39.1.1.8. getLdap

getLdap()

Returns the LDAP Object

Return type:ZendLdapLdap The ZendLdapLdap object used to authenticate the credentials

39.1.1.9. setLdap

setLdap()

Set an Ldap connection

Parameters:ZendLdapLdap – An existing Ldap object
Return type:Ldap Provides a fluent interface

39.1.1.10. getAuthorityName

getAuthorityName()

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

Return type:string

39.1.1.11. authenticate

authenticate()

Authenticate the user

Return type:AuthenticationResult
Throws :ExceptionExceptionInterface

39.1.1.12. prepareOptions

prepareOptions()

Sets the LDAP specific options on the ZendLdapLdap instance

Parameters:
  • ZendLdapLdap
  • array
Return type:

array of auth-adapter specific options

39.1.1.13. checkGroupMembership

checkGroupMembership()

Checks the group membership of the bound user

Parameters:
  • ZendLdapLdap
  • string
  • string
  • array
Return type:

string|true

39.1.1.14. getAccountObject

getAccountObject()

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

This resembles the feature {@see ZendAuthenticationAdapterDbTable::getResultRowObject()}. Closes ZF-6813

Parameters:
  • array
  • array
Return type:

stdClass|bool

39.1.1.15. optionsToString

optionsToString()

Converts options to string

Parameters:array
Return type:string