LdapBindAuthenticationProvider
extends UserAuthenticationProvider
in package
LdapBindAuthenticationProvider authenticates a user against an LDAP server.
The only way to check user credentials is to try to connect the user with its credentials to the ldap.
Tags
Table of Contents
- $dnString : mixed
- $hideUserNotFoundExceptions : mixed
- $ldap : mixed
- $providerKey : mixed
- $queryString : mixed
- $searchDn : mixed
- $searchPassword : mixed
- $userChecker : mixed
- $userProvider : mixed
- __construct() : mixed
- authenticate() : mixed
- {@inheritdoc}
- setQueryString() : mixed
- Set a query string to use in order to find a DN for the username.
- supports() : bool
- Checks whether this provider supports the given token.
- checkAuthentication() : mixed
- Does additional checks on the user and token (like validating the credentials).
- retrieveUser() : UserInterface
- Retrieves the user from an implementation-specific location.
- getRoles() : array<string|int, mixed>
- Retrieves roles from user and appends SwitchUserRole if original token contained one.
Properties
$dnString
private
mixed
$dnString
$hideUserNotFoundExceptions
private
mixed
$hideUserNotFoundExceptions
$ldap
private
mixed
$ldap
$providerKey
private
mixed
$providerKey
$queryString
private
mixed
$queryString
$searchDn
private
mixed
$searchDn
$searchPassword
private
mixed
$searchPassword
$userChecker
private
mixed
$userChecker
$userProvider
private
mixed
$userProvider
Methods
__construct()
public
__construct(UserProviderInterface $userProvider, UserCheckerInterface $userChecker, string $providerKey, LdapInterface $ldap[, string $dnString = '{username}' ][, bool $hideUserNotFoundExceptions = true ][, string $searchDn = '' ][, string $searchPassword = '' ]) : mixed
Parameters
- $userProvider : UserProviderInterface
- $userChecker : UserCheckerInterface
- $providerKey : string
- $ldap : LdapInterface
- $dnString : string = '{username}'
- $hideUserNotFoundExceptions : bool = true
- $searchDn : string = ''
- $searchPassword : string = ''
Return values
mixed —authenticate()
{@inheritdoc}
public
authenticate(TokenInterface $token) : mixed
Parameters
- $token : TokenInterface
Return values
mixed —setQueryString()
Set a query string to use in order to find a DN for the username.
public
setQueryString(string $queryString) : mixed
Parameters
- $queryString : string
Return values
mixed —supports()
Checks whether this provider supports the given token.
public
supports(TokenInterface $token) : bool
Parameters
- $token : TokenInterface
Return values
bool —true if the implementation supports the Token, false otherwise
checkAuthentication()
Does additional checks on the user and token (like validating the credentials).
protected
checkAuthentication(UserInterface $user, UsernamePasswordToken $token) : mixed
Parameters
- $user : UserInterface
- $token : UsernamePasswordToken
Return values
mixed —retrieveUser()
Retrieves the user from an implementation-specific location.
protected
retrieveUser(mixed $username, UsernamePasswordToken $token) : UserInterface
Parameters
- $username : mixed
-
The username to retrieve
- $token : UsernamePasswordToken
Return values
UserInterface —The user
getRoles()
Retrieves roles from user and appends SwitchUserRole if original token contained one.
private
getRoles(UserInterface $user, TokenInterface $token) : array<string|int, mixed>
Parameters
- $user : UserInterface
- $token : TokenInterface