in src/wagtail_localize_smartling/api/client.py [0:0]
def _headers(self) -> dict[str, str]:
now = timezone.now()
if self.access_token is None or (self.access_token_expires_at <= now):
if self.refresh_token is not None and self.refresh_token_expires_at > now:
self._refresh_access_token()
else:
self._authenticate()
return {"Authorization": f"{self.token_type} {self.access_token}"}