def _get_auth_response_local_server(self, redirect_port): logger.warning( "Interactive function `_get_auth_response_local_server()` called but ignored." ) raise SpotifyOauthError( "Interactive function `_get_auth_response_local_server()` called but ignored." )
def _get_auth_response_interactive(self, open_browser=False): logger.warning( "Interactive function `_get_auth_response_interactive()` called but ignored." ) raise SpotifyOauthError( "Interactive function `_get_auth_response_interactive()` called but ignored." )
def get_cached_token(self): """ Gets a cached auth token """ token_info = None try: token_info_string = get_spotify_token_info(self.discord_uid) token_info = json.loads(token_info_string) # if scopes don't match, then bail if "scope" not in token_info or not self._is_scope_subset( self.scope, token_info["scope"]): return None if self.is_token_expired(token_info): token_info = self.refresh_access_token( token_info["refresh_token"]) except Exception as e: logger.warning(f"Couldn't read cache: {e}") return token_info
def _open_auth_url(self): logger.warning( "Interactive function `_open_auth_url()` called but ignored.")
def _save_token_info(self, token_info): try: add_or_update_spotify_token_info(uid=self.discord_uid, token_info=json.dumps(token_info)) except Exception as e: logger.warning(f"Couldn't read cache: {e}")