(self)
| 378 | |
| 379 | @property |
| 380 | def _is_expired(self) -> bool: |
| 381 | assert self.__installation_authorization is not None |
| 382 | token_expires_at = self.__installation_authorization.expires_at - TOKEN_REFRESH_THRESHOLD_TIMEDELTA |
| 383 | return token_expires_at < datetime.now(timezone.utc) |
| 384 | |
| 385 | def _get_installation_authorization(self) -> InstallationAuthorization: |
| 386 | assert self.__integration is not None, "Method withRequester(Requester) must be called first" |