mirror of
https://github.com/USA-RedDragon/badnest.git
synced 2025-01-18 19:31:14 +00:00
Set auth headers globally after Google login
This commit is contained in:
parent
180c46e84d
commit
fab05e12cd
@ -96,6 +96,9 @@ class NestAPI():
|
||||
r = self._session.post(url=URL_JWT, headers=headers, params=params)
|
||||
self._user_id = r.json()['claims']['subject']['nestId']['id']
|
||||
self._access_token = r.json()['jwt']
|
||||
self._session.headers.update({
|
||||
"Authorization": f"Basic {self._access_token}",
|
||||
})
|
||||
|
||||
def _login_dropcam(self):
|
||||
self._session.post(
|
||||
@ -110,7 +113,6 @@ class NestAPI():
|
||||
r = self._session.get(
|
||||
f"{CAMERA_WEBAPI_BASE}/api/cameras."
|
||||
+ "get_owned_and_member_of_with_properties",
|
||||
headers={"Authorization": f"Basic {self._access_token}"},
|
||||
)
|
||||
|
||||
for camera in r.json()["items"]:
|
||||
|
Loading…
x
Reference in New Issue
Block a user