Validator.php 515 B

123456789101112131415161718192021222324
  1. <?php
  2. namespace Lcobucci\JWT;
  3. use Lcobucci\JWT\Validation\Constraint;
  4. use Lcobucci\JWT\Validation\NoConstraintsGiven;
  5. use Lcobucci\JWT\Validation\RequiredConstraintsViolated;
  6. interface Validator
  7. {
  8. /**
  9. * @throws RequiredConstraintsViolated
  10. * @throws NoConstraintsGiven
  11. */
  12. public function assert(Token $token, Constraint ...$constraints);
  13. /**
  14. * @return bool
  15. *
  16. * @throws NoConstraintsGiven
  17. */
  18. public function validate(Token $token, Constraint ...$constraints);
  19. }