private function validateSignature(): void
    {
        $signature = '';

        try {
            $signature = $this->encode->signature(
                $this->encode->decode($this->getHeader()),
                $this->encode->decode($this->getPayload()),
                $this->jwt->getSecret()
            );
        } catch (\Throwable $e) {
            throw new ValidateException('Token could not be parsed.', 2);
        }

        if (!$this->validate->signature($signature, $this->getSignature())) {
            throw new ValidateException('Signature is invalid.', 3);
        }
    }