CoreFiles by mySites.guru
LdapBadge.php74 lines, 1,633 bytes, from Joomla_6.0.2-Stable-Full_Package.zip
Raw History Compare with 6.0.1
md5
4e4e3065c0f4157f2334363c167199a4
sha1
73c6e926a52b0f39ee4c7979dffe372242701f10
sha256
c6ab28764f0a6c7f9e8c320b82652ce181900a9a80e8a4f3a934d047ae0990e4
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <[email protected]>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Ldap\Security;

use Symfony\Component\Security\Http\Authenticator\Passport\Badge\BadgeInterface;

/**
 * A badge indicating that the credentials should be checked using LDAP.
 *
 * This badge must be used together with PasswordCredentials.
 *
 * @author Wouter de Jong <[email protected]>
 *
 * @final
 */
class LdapBadge implements BadgeInterface
{
    private bool $resolved = false;
    private string $queryString;

    public function __construct(
        private string $ldapServiceId,
        private string $dnString = '{user_identifier}',
        private string $searchDn = '',
        private string $searchPassword = '',
        ?string $queryString = null,
    ) {
        $this->queryString = $queryString ?? '';
    }

    public function getLdapServiceId(): string
    {
        return $this->ldapServiceId;
    }

    public function getDnString(): string
    {
        return $this->dnString;
    }

    public function getSearchDn(): string
    {
        return $this->searchDn;
    }

    public function getSearchPassword(): string
    {
        return $this->searchPassword;
    }

    public function getQueryString(): string
    {
        return $this->queryString;
    }

    public function markResolved(): void
    {
        $this->resolved = true;
    }

    public function isResolved(): bool
    {
        return $this->resolved;
    }
}

The same content is in 49 releases, Joomla 6.0.0-beta1 to 6.3.0-alpha1. See them all, or every version of this file.