|
@@ -30,9 +30,9 @@ class R2R:
|
|
print(
|
|
print(
|
|
"1111111111111111111111111111111122222vvdgdfdf" + tool_settings.R2R_USERNAME
|
|
"1111111111111111111111111111111122222vvdgdfdf" + tool_settings.R2R_USERNAME
|
|
)
|
|
)
|
|
- print(tool_settings.R2R_USERNAME)
|
|
|
|
- print(tool_settings.R2R_PASSWORD)
|
|
|
|
- # print(self.client_sync.access_token)
|
|
|
|
|
|
+ # print(tool_settings.R2R_USERNAME)
|
|
|
|
+ # print(tool_settings.R2R_PASSWORD)
|
|
|
|
+ print(self.client_sync.access_token)
|
|
|
|
|
|
async def init(self):
|
|
async def init(self):
|
|
if not self.auth_enabled:
|
|
if not self.auth_enabled:
|
|
@@ -129,18 +129,18 @@ class R2R:
|
|
async def _check_login(self):
|
|
async def _check_login(self):
|
|
if not self.auth_enabled:
|
|
if not self.auth_enabled:
|
|
return
|
|
return
|
|
- if not self.client.access_token and verify_jwt_expiration(
|
|
|
|
- self.client.access_token
|
|
|
|
- ):
|
|
|
|
|
|
+ if self.client.access_token and verify_jwt_expiration(self.client.access_token):
|
|
return
|
|
return
|
|
else:
|
|
else:
|
|
await self.init()
|
|
await self.init()
|
|
|
|
|
|
def _check_login_sync(self):
|
|
def _check_login_sync(self):
|
|
|
|
+ print("access_tokenaccess_tokenaccess_tokenaccess_token")
|
|
|
|
+ print(self.client_sync.access_token)
|
|
if not self.auth_enabled:
|
|
if not self.auth_enabled:
|
|
return
|
|
return
|
|
try:
|
|
try:
|
|
- if not self.client_sync.access_token and verify_jwt_expiration(
|
|
|
|
|
|
+ if self.client_sync.access_token and verify_jwt_expiration(
|
|
self.client_sync.access_token
|
|
self.client_sync.access_token
|
|
):
|
|
):
|
|
return
|
|
return
|