def compare_access_token(self):
        """compare_access_token will compare the current access token with the access token stored in keyvault
        and update the header for further use.
        """
        try:
            keyvault_access_token = self.keyvault_obj.get_keyvault_secret(self.access_token_key)
            header_access_token = self._header.get("Authorization")
            if keyvault_access_token == header_access_token:
                logging.info("Armis Device Connector: KeyVault Access Token Invalid. Generating New Token.")
                self._get_access_token_device("/access_token/")
            else:
                logging.info("Armis Device Connector: KeyVault Access Token Updated. Updating Header Value.")
                self._header.update({"Authorization": keyvault_access_token})
        except ArmisException as err:
            logging.error(err)
            raise ArmisException(
                "Armis Device Connector: Error while comparing access token."
            )
compare_access_token will compare the current access token with the access token stored in keyvault
        and update the header for further use.
        
Solutions/Armis/Data Connectors/ArmisDevice/ArmisDeviceSentinelConnector/__init__.py