Documentation

Ldap extends AbstractAuth
in package

Ldap auth class

Tags
category

Pop

author

Nick Sagona, III dev@nolainteractive.com

copyright

Copyright (c) 2009-2021 NOLA Interactive, LLC. (http://www.nolainteractive.com)

license

http://www.popphp.org/license New BSD License

version
3.3.0

Table of Contents

NOT_VALID  = 0
Constant for auth result
VALID  = 1
$host  : string
Ldap host
$options  : array<string|int, mixed>
Ldap options
$password  : string
Authentication password
$port  : string
Ldap port
$resource  : resource
Ldap resource
$result  : int
Authentication result
$username  : string
Authentication username
__construct()  : mixed
Constructor
authenticate()  : int
Method to authenticate
getHost()  : string
Get the host
getOption()  : mixed
Get an option
getOptions()  : array<string|int, mixed>
Get options
getPassword()  : string
Get the password
getPort()  : string
Get the port
getResource()  : resource
Get the Ldap resource
getResult()  : int
Get the authentication result
getUsername()  : string
Get the username
isValid()  : bool
Determine if the authentication attempt was valid
resource()  : resource
Get the Ldap resource (alias)
setHost()  : string
Set the host
setOption()  : Ldap
Set an option
setOptions()  : Ldap
Set options
setPassword()  : AbstractAuth
Set the password
setPort()  : Ldap
Set the port
setUsername()  : AbstractAuth
Set the username
verify()  : bool
Method to verify a password against a hash

Constants

NOT_VALID

Constant for auth result

public int NOT_VALID = ""

Properties

$host

Ldap host

protected string $host = null

$options

Ldap options

protected array<string|int, mixed> $options = []

$password

Authentication password

protected string $password = null

$port

Ldap port

protected string $port = null

$resource

Ldap resource

protected resource $resource = null

$username

Authentication username

protected string $username = null

Methods

__construct()

Constructor

public __construct(string $host[, string $port = null ][, array<string|int, mixed> $options = null ]) : mixed

Instantiate the Ldap auth adapter object

Parameters
$host : string
$port : string = null
$options : array<string|int, mixed> = null
Return values
mixed

authenticate()

Method to authenticate

public authenticate(string $username, string $password) : int
Parameters
$username : string
$password : string
Return values
int

getHost()

Get the host

public getHost() : string
Return values
string

getOption()

Get an option

public getOption(mixed $option) : mixed
Parameters
$option : mixed
Return values
mixed

getOptions()

Get options

public getOptions() : array<string|int, mixed>
Return values
array<string|int, mixed>

getPassword()

Get the password

public getPassword() : string
Return values
string

getPort()

Get the port

public getPort() : string
Return values
string

getResource()

Get the Ldap resource

public getResource() : resource
Return values
resource

getResult()

Get the authentication result

public getResult() : int
Return values
int

getUsername()

Get the username

public getUsername() : string
Return values
string

isValid()

Determine if the authentication attempt was valid

public isValid() : bool
Return values
bool

resource()

Get the Ldap resource (alias)

public resource() : resource
Return values
resource

setHost()

Set the host

public setHost(string $host) : string
Parameters
$host : string
Return values
string

setOption()

Set an option

public setOption(mixed $option, mixed $value) : Ldap
Parameters
$option : mixed
$value : mixed
Return values
Ldap

setOptions()

Set options

public setOptions(array<string|int, mixed> $options) : Ldap
Parameters
$options : array<string|int, mixed>
Return values
Ldap

setPort()

Set the port

public setPort(string $port) : Ldap
Parameters
$port : string
Return values
Ldap

verify()

Method to verify a password against a hash

public verify(string $password, string $hash) : bool
Parameters
$password : string
$hash : string
Return values
bool

Search results