Your IP : 216.73.216.220


Current Path : /home/rtorresani/www/vendor/magento/module-integration/Model/
Upload File :
Current File : //home/rtorresani/www/vendor/magento/module-integration/Model/CompositeUserTokenValidator.php

<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

declare(strict_types=1);

namespace Magento\Integration\Model;

use Magento\Integration\Api\Data\UserToken;
use Magento\Integration\Api\UserTokenValidatorInterface;

class CompositeUserTokenValidator implements UserTokenValidatorInterface
{
    /**
     * @var UserTokenValidatorInterface[]
     */
    private $validators;

    /**
     * @param UserTokenValidatorInterface[] $validators
     */
    public function __construct(array $validators)
    {
        $this->validators = $validators;
    }

    /**
     * @inheritDoc
     */
    public function validate(UserToken $token): void
    {
        foreach ($this->validators as $tokenValidator) {
            $tokenValidator->validate($token);
        }
    }
}