Documentation

Ldap extends AbstractAuth
in package

Ldap auth class

Tags
category

Pop

author

Nick Sagona, III dev@nolainteractive.com

copyright

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

license

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

version
4.0.0

Table of Contents

Constants

NOT_VALID  = 0
Constant for auth result
VALID  = 1

Properties

$host  : string|null
Ldap host
$options  : array<string|int, mixed>
Ldap options
$password  : string|null
Authentication password
$port  : string|int|null
Ldap port
$resource  : mixed
Ldap resource
$result  : int
Authentication result
$username  : string|null
Authentication username

Methods

__construct()  : mixed
Constructor
authenticate()  : int
Method to authenticate
getHost()  : string|null
Get the host
getOption()  : mixed
Get an option
getOptions()  : array<string|int, mixed>
Get options
getPassword()  : string|null
Get the password
getPort()  : string|int|null
Get the port
getResource()  : mixed
Get the Ldap resource
getResult()  : int
Get the authentication result
getUsername()  : string|null
Get the username
isAuthenticated()  : bool
Determine if the authentication attempt was successful
resource()  : mixed
Get the Ldap resource (alias)
setHost()  : Ldap
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 = 0

Properties

$host

Ldap host

protected string|null $host = null

$options

Ldap options

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

$password

Authentication password

protected string|null $password = null

$port

Ldap port

protected string|int|null $port = null

$resource

Ldap resource

protected mixed $resource = null

$username

Authentication username

protected string|null $username = null

Methods

__construct()

Constructor

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

Instantiate the Ldap auth adapter object

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

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|null
Return values
string|null

getOption()

Get an option

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

getOptions()

Get options

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

getPassword()

Get the password

public getPassword() : string|null
Return values
string|null

getPort()

Get the port

public getPort() : string|int|null
Return values
string|int|null

getResource()

Get the Ldap resource

public getResource() : mixed

getResult()

Get the authentication result

public getResult() : int
Return values
int

getUsername()

Get the username

public getUsername() : string|null
Return values
string|null

isAuthenticated()

Determine if the authentication attempt was successful

public isAuthenticated() : bool
Return values
bool

resource()

Get the Ldap resource (alias)

public resource() : mixed

setHost()

Set the host

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

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|int $port) : Ldap
Parameters
$port : string|int
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

        
On this page

Search results