PHP Class BookStack\Services\LdapService

Afficher le fichier Open project: ssddanbrown/bookstack Class Usage Examples

Protected Properties

Свойство Type Description
$config
$ldap
$ldapConnection

Méthodes publiques

Méthode Description
__construct ( Ldap $ldap ) LdapService constructor.
getUserDetails ( $userName ) : array | null Get the details of a user from LDAP using the given username.
validateUserCredentials ( Illuminate\Contracts\Auth\Authenticatable $user, string $username, string $password ) : boolean

Méthodes protégées

Méthode Description
bindSystemUser ( $connection ) Bind the system user to the LDAP connection using the given credentials otherwise anonymous access is attempted.
buildFilter ( string $filterString, array $attrs ) : string Build a filter string by injecting common variables.
getConnection ( ) : resource Get the connection to the LDAP server.

Method Details

__construct() public méthode

LdapService constructor.
public __construct ( Ldap $ldap )
$ldap Ldap

bindSystemUser() protected méthode

Bind the system user to the LDAP connection using the given credentials otherwise anonymous access is attempted.
protected bindSystemUser ( $connection )
$connection

buildFilter() protected méthode

Build a filter string by injecting common variables.
protected buildFilter ( string $filterString, array $attrs ) : string
$filterString string
$attrs array
Résultat string

getConnection() protected méthode

Creates a new connection if one does not exist.
protected getConnection ( ) : resource
Résultat resource

getUserDetails() public méthode

User found via configurable user filter.
public getUserDetails ( $userName ) : array | null
$userName
Résultat array | null

validateUserCredentials() public méthode

public validateUserCredentials ( Illuminate\Contracts\Auth\Authenticatable $user, string $username, string $password ) : boolean
$user Illuminate\Contracts\Auth\Authenticatable
$username string
$password string
Résultat boolean

Property Details

$config protected_oe property

protected $config

$ldap protected_oe property

protected $ldap

$ldapConnection protected_oe property

protected $ldapConnection