[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/vendor/symfony/ldap/Security/ -> LdapBadge.php (source)

   1  <?php
   2  
   3  /*
   4   * This file is part of the Symfony package.
   5   *
   6   * (c) Fabien Potencier <[email protected]>
   7   *
   8   * For the full copyright and license information, please view the LICENSE
   9   * file that was distributed with this source code.
  10   */
  11  
  12  namespace Symfony\Component\Ldap\Security;
  13  
  14  use Symfony\Component\Security\Http\Authenticator\Passport\Badge\BadgeInterface;
  15  
  16  /**
  17   * A badge indicating that the credentials should be checked using LDAP.
  18   *
  19   * This badge must be used together with PasswordCredentials.
  20   *
  21   * @author Wouter de Jong <[email protected]>
  22   *
  23   * @final
  24   */
  25  class LdapBadge implements BadgeInterface
  26  {
  27      private $resolved = false;
  28      private $ldapServiceId;
  29      private $dnString;
  30      private $searchDn;
  31      private $searchPassword;
  32      private $queryString;
  33  
  34      public function __construct(string $ldapServiceId, string $dnString = '{username}', string $searchDn = '', string $searchPassword = '', string $queryString = null)
  35      {
  36          $this->ldapServiceId = $ldapServiceId;
  37          $this->dnString = $dnString;
  38          $this->searchDn = $searchDn;
  39          $this->searchPassword = $searchPassword;
  40          $this->queryString = $queryString;
  41      }
  42  
  43      public function getLdapServiceId(): string
  44      {
  45          return $this->ldapServiceId;
  46      }
  47  
  48      public function getDnString(): string
  49      {
  50          return $this->dnString;
  51      }
  52  
  53      public function getSearchDn(): string
  54      {
  55          return $this->searchDn;
  56      }
  57  
  58      public function getSearchPassword(): string
  59      {
  60          return $this->searchPassword;
  61      }
  62  
  63      public function getQueryString(): ?string
  64      {
  65          return $this->queryString;
  66      }
  67  
  68      public function markResolved(): void
  69      {
  70          $this->resolved = true;
  71      }
  72  
  73      public function isResolved(): bool
  74      {
  75          return $this->resolved;
  76      }
  77  }


Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer