public function isExpired(int $tolerance) : bool
    {
        $timestamp = $this->headers->get('X-SIGNED-TIMESTAMP', '1901-01-01 12:00:00');
        $issuedAt = Carbon::parse($timestamp);

        $isValid = Helpers::verifyDateTime($timestamp, 'Y-m-d H:i:s');

        return !$isValid || Carbon::now()->diffInSeconds($issuedAt) > $tolerance;
    }
public function isExpired(int $tolerance) : bool
    {
        $timestamp = $this->headers->get('X-SIGNED-TIMESTAMP', '1901-01-01 12:00:00');
        $issuedAt = Carbon::parse($timestamp);

        $isValid = Helpers::verifyDateTime($timestamp, 'Y-m-d H:i:s');

        return !$isValid || Carbon::now()->diffInSeconds($issuedAt) > $tolerance;
    }
public function isExpired ( int $ tolerance ) : bool { $ timestamp = $ this -> headers -> get ( 'X-SIGNED-TIMESTAMP' , '1901-01-01 12:00:00' ) ; $ issuedAt = Carbon :: parse ( $ timestamp ) ; $ isValid = Helpers :: verifyDateTime ( $ timestamp , 'Y-m-d H:i:s' ) ; return ! $ isValid || Carbon :: now ( ) -> diffInSeconds ( $ issuedAt ) > $ tolerance ; }
Checks if this request was issued within tolerance seconds of now.

@param int $tolerance
The number of seconds we'll tolerate for a request delay.

@return bool
true if the request was issued within tolerance seconds, false
otherwise.
Checks if this request was issued within tolerance seconds of now .