API Documentation

Auth/Adapter/Ldap.php

Includes Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Auth
subpackage
Zend_Auth_Adapter
version
$Id: Ldap.php 21320 2010-03-04 16:05:09Z sgehrig $
Classes
Zend_Auth_Adapter_Ldap

Description

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.

Zend_Auth_Adapter_Ldap

Implements
Zend_Auth_Adapter_Interface
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Auth
subpackage
Zend_Auth_Adapter
Properties
$_ldap
$_options
$_username
$_password
$_authenticatedDn
Methods
__construct
getOptions
setOptions
getUsername
setUsername
getPassword
setPassword
setIdentity
setCredential
getLdap
setLdap
_getAuthorityName
authenticate
_prepareOptions
_checkGroupMembership
getAccountObject
_optionsToString

Description

Properties

$_authenticatedDn

string $_authenticatedDn = 'null'

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

Details

$_authenticatedDn
string
visibility
protected
default
null
final
false
static
false

$_ldap

Zend_Ldap $_ldap = 'null'

The Zend_Ldap context.

Details

$_ldap
Zend_Ldap
visibility
protected
default
null
final
false
static
false

$_options

array $_options = 'null'

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

Details

$_options
array
visibility
protected
default
null
final
false
static
false

$_password

string $_password = 'null'

The password of the account being authenticated.

Details

$_password
string
visibility
protected
default
null
final
false
static
false

$_username

string $_username = 'null'

The username of the account being authenticated.

Details

$_username
string
visibility
protected
default
null
final
false
static
false

Methods

__construct

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

Constructor

Arguments
$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
Details
visibility
public
final
false
static
false

_checkGroupMembership

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

Checks the group membership of the bound user

Arguments
$ldap
Zend_Ldap
$canonicalName
string
$dn
string
$adapterOptions
array
Output
string|true
Details
visibility
protected
final
false
static
false

_getAuthorityName

_getAuthorityName( ) : string

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

Output
string
Details
visibility
protected
final
false
static
false

_optionsToString

_optionsToString( array $options ) : string

Converts options to string

Arguments
$options
array
Output
string
Details
visibility
private
final
false
static
false

_prepareOptions

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

Sets the LDAP specific options on the Zend_Ldap instance

Arguments
$ldap
Zend_Ldap
$options
array
Output
array
of auth-adapter specific options
Details
visibility
protected
final
false
static
false

authenticate

authenticate( ) : Zend_Auth_Result

Authenticate the user

Details
visibility
public
final
false
static
false
throws

getAccountObject

getAccountObject( 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

Arguments
$returnAttribs
array
$omitAttribs
array
Output
stdClass|boolean
Details
visibility
public
final
false
static
false

getLdap

getLdap( ) : Zend_Ldap

Returns the LDAP Object

Output
Zend_Ldap
The Zend_Ldap object used to authenticate the credentials
Details
visibility
public
final
false
static
false

getOptions

getOptions( ) : array|null

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

Output
array|null
Details
visibility
public
final
false
static
false

getPassword

getPassword( ) : string|null

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

Output
string|null
Details
visibility
public
final
false
static
false

getUsername

getUsername( ) : string|null

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

Output
string|null
Details
visibility
public
final
false
static
false

setCredential

setCredential( string $credential ) : Zend_Auth_Adapter_Ldap

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

Proxies to {@see setPassword()}

Closes ZF-6813

Arguments
$credential
string
Output
Zend_Auth_Adapter_Ldap
Provides a fluent interface
Details
visibility
public
final
false
static
false

setIdentity

setIdentity( string $identity ) : Zend_Auth_Adapter_Ldap

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

Proxies to {@see setUsername()}

Closes ZF-6813

Arguments
$identity
string
Output
Zend_Auth_Adapter_Ldap
Provides a fluent interface
Details
visibility
public
final
false
static
false

setLdap

setLdap( Zend_Ldap $ldap ) : Zend_Auth_Adapter_Ldap

Set an Ldap connection

Arguments
$ldap
Zend_Ldap
An existing Ldap object
Output
Zend_Auth_Adapter_Ldap
Provides a fluent interface
Details
visibility
public
final
false
static
false

setOptions

setOptions( array $options ) : Zend_Auth_Adapter_Ldap

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

Arguments
$options
array
The array of arrays of Zend_Ldap options
Output
Zend_Auth_Adapter_Ldap
Provides a fluent interface
Details
visibility
public
final
false
static
false

setPassword

setPassword( string $password ) : Zend_Auth_Adapter_Ldap

Sets the passwort for the account

Arguments
$password
string
The password of the account being authenticated
Output
Zend_Auth_Adapter_Ldap
Provides a fluent interface
Details
visibility
public
final
false
static
false

setUsername

setUsername( string $username ) : Zend_Auth_Adapter_Ldap

Sets the username for binding

Arguments
$username
string
The username for binding
Output
Zend_Auth_Adapter_Ldap
Provides a fluent interface
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.