public static function fromResponseData(array $data): self
    {
        // @todo fix this as idle != duration.
        // @todo We need to store the date this token was created.
        static::validateData($data);
        $lifetime = (int) floor(min($data['signInResponse']['duration'], $data['signInResponse']['idleTimeout']) / 1000);
        $token = new self($data['signInResponse']['userId'], $data['signInResponse']['token'], $lifetime);

        return $token;
    }