(self)
| 275 | return response.ok |
| 276 | |
| 277 | def ensure_active_token(self): |
| 278 | if not self.token: |
| 279 | return False |
| 280 | is_active = self.session.ensure_active_token(token=self.token) |
| 281 | self._save_token_to_creds(self.token) |
| 282 | return is_active |
| 283 | |
| 284 | def token_expires_soon(self, within: int = 60) -> Optional[bool]: |
| 285 | """Is the token expired, or expires soon (within the next ``within`` seconds)?""" |