feat: don't store client secrets
This commit is contained in:
parent
bc19e07008
commit
61d363c9ee
|
|
@ -166,15 +166,11 @@ class Node:
|
|||
self._spotify_client: Optional[spotify.Client] = None
|
||||
self._apple_music_client: Optional[applemusic.Client] = None
|
||||
|
||||
self._spotify_client_id: Optional[str] = spotify_client_id
|
||||
self._spotify_client_secret: Optional[str] = spotify_client_secret
|
||||
|
||||
if self._spotify_client_id and self._spotify_client_secret:
|
||||
if spotify_client_id and spotify_client_secret:
|
||||
self._spotify_client = spotify.Client(
|
||||
self._spotify_client_id,
|
||||
self._spotify_client_secret,
|
||||
spotify_client_id,
|
||||
spotify_client_secret,
|
||||
)
|
||||
|
||||
if apple_music:
|
||||
self._apple_music_client = applemusic.Client()
|
||||
|
||||
|
|
|
|||
|
|
@ -34,15 +34,12 @@ class Client:
|
|||
"""
|
||||
|
||||
def __init__(self, client_id: str, client_secret: str) -> None:
|
||||
self._client_id: str = client_id
|
||||
self._client_secret: str = client_secret
|
||||
|
||||
self.session: aiohttp.ClientSession = None # type: ignore
|
||||
|
||||
self._bearer_token: Optional[str] = None
|
||||
self._expiry: float = 0.0
|
||||
self._auth_token = b64encode(
|
||||
f"{self._client_id}:{self._client_secret}".encode(),
|
||||
f"{client_id}:{client_secret}".encode(),
|
||||
)
|
||||
self._grant_headers = {
|
||||
"Authorization": f"Basic {self._auth_token.decode()}",
|
||||
|
|
|
|||
Loading…
Reference in New Issue