brynq-sdk-acerta 1.1.1__tar.gz → 1.1.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {brynq_sdk_acerta-1.1.1 → brynq_sdk_acerta-1.1.3}/PKG-INFO +1 -1
- {brynq_sdk_acerta-1.1.1 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/acerta.py +16 -8
- {brynq_sdk_acerta-1.1.1 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/addresses.py +3 -0
- {brynq_sdk_acerta-1.1.1 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta.egg-info/PKG-INFO +1 -1
- {brynq_sdk_acerta-1.1.1 → brynq_sdk_acerta-1.1.3}/setup.py +1 -1
- {brynq_sdk_acerta-1.1.1 → brynq_sdk_acerta-1.1.3}/README.md +0 -0
- {brynq_sdk_acerta-1.1.1 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/__init__.py +0 -0
- {brynq_sdk_acerta-1.1.1 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/agreements.py +0 -0
- {brynq_sdk_acerta-1.1.1 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/bank_accounts.py +0 -0
- {brynq_sdk_acerta-1.1.1 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/code_lists.py +0 -0
- {brynq_sdk_acerta-1.1.1 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/company_cars.py +0 -0
- {brynq_sdk_acerta-1.1.1 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/contact_information.py +0 -0
- {brynq_sdk_acerta-1.1.1 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/cost_centers.py +0 -0
- {brynq_sdk_acerta-1.1.1 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/employees.py +0 -0
- {brynq_sdk_acerta-1.1.1 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/employees_additional_information.py +0 -0
- {brynq_sdk_acerta-1.1.1 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/employer.py +0 -0
- {brynq_sdk_acerta-1.1.1 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/family_members.py +0 -0
- {brynq_sdk_acerta-1.1.1 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/family_situation.py +0 -0
- {brynq_sdk_acerta-1.1.1 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/inservice.py +0 -0
- {brynq_sdk_acerta-1.1.1 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/salaries.py +0 -0
- {brynq_sdk_acerta-1.1.1 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/schemas/__init__.py +0 -0
- {brynq_sdk_acerta-1.1.1 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/schemas/address.py +0 -0
- {brynq_sdk_acerta-1.1.1 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/schemas/agreement.py +0 -0
- {brynq_sdk_acerta-1.1.1 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/schemas/bank_account.py +0 -0
- {brynq_sdk_acerta-1.1.1 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/schemas/company_car.py +0 -0
- {brynq_sdk_acerta-1.1.1 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/schemas/contact_information.py +0 -0
- {brynq_sdk_acerta-1.1.1 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/schemas/cost_center.py +0 -0
- {brynq_sdk_acerta-1.1.1 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/schemas/employee.py +0 -0
- {brynq_sdk_acerta-1.1.1 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/schemas/employer.py +0 -0
- {brynq_sdk_acerta-1.1.1 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/schemas/family.py +0 -0
- {brynq_sdk_acerta-1.1.1 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/schemas/in_service.py +0 -0
- {brynq_sdk_acerta-1.1.1 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/schemas/in_service_config.py +0 -0
- {brynq_sdk_acerta-1.1.1 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/schemas/planning.py +0 -0
- {brynq_sdk_acerta-1.1.1 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/schemas/salaries.py +0 -0
- {brynq_sdk_acerta-1.1.1 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta.egg-info/SOURCES.txt +0 -0
- {brynq_sdk_acerta-1.1.1 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta.egg-info/dependency_links.txt +0 -0
- {brynq_sdk_acerta-1.1.1 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta.egg-info/not-zip-safe +0 -0
- {brynq_sdk_acerta-1.1.1 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta.egg-info/requires.txt +0 -0
- {brynq_sdk_acerta-1.1.1 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta.egg-info/top_level.txt +0 -0
- {brynq_sdk_acerta-1.1.1 → brynq_sdk_acerta-1.1.3}/setup.cfg +0 -0
|
@@ -39,7 +39,7 @@ class Acerta(BrynQ):
|
|
|
39
39
|
|
|
40
40
|
# Extract credentials and configure OAuth2 session with automatic token renewal
|
|
41
41
|
credentials = self.interfaces.credentials.get(
|
|
42
|
-
system="acerta
|
|
42
|
+
system="acerta",
|
|
43
43
|
system_type=system_type,
|
|
44
44
|
)
|
|
45
45
|
data = credentials.get("data", {})
|
|
@@ -66,6 +66,8 @@ class Acerta(BrynQ):
|
|
|
66
66
|
include_client_id=True,
|
|
67
67
|
)
|
|
68
68
|
|
|
69
|
+
self._refreshing_token = False
|
|
70
|
+
|
|
69
71
|
# Keep access_token attribute for backward compatibility
|
|
70
72
|
self.access_token = token.get("access_token")
|
|
71
73
|
|
|
@@ -101,17 +103,23 @@ class Acerta(BrynQ):
|
|
|
101
103
|
|
|
102
104
|
def _ensure_valid_token(self):
|
|
103
105
|
"""Ensure the OAuth token exists and is not about to expire."""
|
|
106
|
+
if self._refreshing_token:
|
|
107
|
+
return
|
|
104
108
|
tok = getattr(self.session, "token", {}) or {}
|
|
105
109
|
expires_at = tok.get("expires_at")
|
|
106
110
|
# Refresh if missing or expiring within 30 seconds
|
|
107
111
|
if not expires_at or (expires_at - time.time()) < 30:
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
112
|
+
self._refreshing_token = True
|
|
113
|
+
try:
|
|
114
|
+
new_token = self.session.fetch_token(
|
|
115
|
+
token_url=self._token_url,
|
|
116
|
+
client_id=self._client_id,
|
|
117
|
+
client_secret=self._client_secret,
|
|
118
|
+
include_client_id=True,
|
|
119
|
+
)
|
|
120
|
+
self.access_token = new_token.get("access_token")
|
|
121
|
+
finally:
|
|
122
|
+
self._refreshing_token = False
|
|
115
123
|
|
|
116
124
|
def _request_with_pre_expiry(self, method, url, **kwargs):
|
|
117
125
|
self._ensure_valid_token()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{brynq_sdk_acerta-1.1.1 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/schemas/contact_information.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{brynq_sdk_acerta-1.1.1 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta/schemas/in_service_config.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{brynq_sdk_acerta-1.1.1 → brynq_sdk_acerta-1.1.3}/brynq_sdk_acerta.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|