vendor/symfony/security-http/Authenticator/Passport/SelfValidatingPassport.php line 23

Open in your IDE?
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\Security\Http\Authenticator\Passport;
  11. use Symfony\Component\Security\Http\Authenticator\Passport\Badge\BadgeInterface;
  12. use Symfony\Component\Security\Http\Authenticator\Passport\Badge\UserBadge;
  13. /**
  14. * An implementation used when there are no credentials to be checked (e.g.
  15. * API token authentication).
  16. *
  17. * @author Wouter de Jong <wouter@wouterj.nl>
  18. */
  19. class SelfValidatingPassport extends Passport
  20. {
  21. /**
  22. * @param BadgeInterface[] $badges
  23. */
  24. public function __construct(UserBadge $userBadge, array $badges = [])
  25. {
  26. $this->addBadge($userBadge);
  27. foreach ($badges as $badge) {
  28. $this->addBadge($badge);
  29. }
  30. }
  31. }