public function validateLoginToken(string $token): ?array
    {
        $token = base64_decode($token);
        $serializedData = Security::decrypt($token, $this->getKey(), $this->getSalt());
        if ($serializedData === false) {
            return null;
        }
        $data = unserialize($serializedData);
        if (!empty($data['expireInterval']) && !empty($data['timestamp'])) {
            $tokenCreated = new Time($data['timestamp']);
            if (!$tokenCreated->wasWithinLast($data['expireInterval'])) {
                return null;
            }
        }

        return $data;
    }