CoreFiles by mySites.guru
EqualsTo.php34 lines, 784 bytes, from Joomla_4.2.2-Stable-Full_Package.zip
Raw History Compare with 4.2.1
md5
b3e9a229f89445a665fb593532f6e1f9
sha1
2b6acba610ee6d5d7bab8dcffd42b11dadc7b3d0
sha256
f326de7f076d58a66696e06c4f5b6b7dd676d9bc60bde6fbc95132c38a328d76
<?php
/**
 * This file is part of Lcobucci\JWT, a simple library to handle JWT and JWS
 *
 * @license http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
 */

namespace Lcobucci\JWT\Claim;

use Lcobucci\JWT\Claim;
use Lcobucci\JWT\ValidationData;

/**
 * Validatable claim that checks if value is strictly equals to the given data
 *
 * @deprecated This class will be removed on v4
 *
 * @author Luís Otávio Cobucci Oblonczyk <[email protected]>
 * @since 2.0.0
 */
class EqualsTo extends Basic implements Claim, Validatable
{
    /**
     * {@inheritdoc}
     */
    public function validate(ValidationData $data)
    {
        if ($data->has($this->getName())) {
            return $this->getValue() === $data->get($this->getName());
        }

        return true;
    }
}

The same content is in 75 releases, Joomla 4.2.0-beta3 to 4.4.14. See them all, or every version of this file.