Constants

NOT_VALID

NOT_VALID = 0 : integer

Constant for auth result

VALID

VALID = 1

Properties

$result

$result : integer

Authentication result

Type

integer

$username

$username : string

Authentication username

Type

string

$password

$password : string

Authentication password

Type

string

$host

$host : string

Ldap host

Type

string

$port

$port : string

Ldap port

Type

string

$options

$options : array

Ldap options

Type

array

$resource

$resource : resource

Ldap resource

Type

resource

Methods

getResult()

getResult() : integer

Get the authentication result

Returns

integer

isValid()

isValid() : boolean

Determine if the authentication attempt was valid

Returns

boolean

getUsername()

getUsername() : string

Get the username

Returns

string

getPassword()

getPassword() : string

Get the password

Returns

string

setUsername()

setUsername(string  $username) : \Pop\Auth\AbstractAuth

Set the username

Parameters

string $username

Returns

\Pop\Auth\AbstractAuth

setPassword()

setPassword(string  $password) : \Pop\Auth\AbstractAuth

Set the password

Parameters

string $password

Returns

\Pop\Auth\AbstractAuth

verify()

verify(string  $password, string  $hash) : boolean

Method to verify a password against a hash

Parameters

string $password
string $hash

Returns

boolean

authenticate()

authenticate(string  $username, string  $password) : integer

Method to authenticate

Parameters

string $username
string $password

Returns

integer

__construct()

__construct(string  $host, string  $port = null, array  $options = null) 

Constructor

Instantiate the Ldap auth adapter object

Parameters

string $host
string $port
array $options

setHost()

setHost(string  $host) : string

Set the host

Parameters

string $host

Returns

string

setPort()

setPort(string  $port) : \Pop\Auth\Ldap

Set the port

Parameters

string $port

Returns

\Pop\Auth\Ldap

setOption()

setOption(mixed  $option, mixed  $value) : \Pop\Auth\Ldap

Set an option

Parameters

mixed $option
mixed $value

Returns

\Pop\Auth\Ldap

setOptions()

setOptions(array  $options) : \Pop\Auth\Ldap

Set options

Parameters

array $options

Returns

\Pop\Auth\Ldap

getHost()

getHost() : string

Get the host

Returns

string

getPort()

getPort() : string

Get the port

Returns

string

getOption()

getOption(mixed  $option) : mixed

Get an option

Parameters

mixed $option

Returns

mixed

getOptions()

getOptions() : array

Get options

Returns

array

getResource()

getResource() : resource

Get the Ldap resource

Returns

resource

resource()

resource() : resource

Get the Ldap resource (alias)

Returns

resource