in src/wagtail_localize_smartling/api/client.py [0:0]
def _authenticate(self):
data = cast(
types.AuthenticateResponseData,
self._request(
method="POST",
path="/auth-api/v2/authenticate",
response_serializer_class=AuthenticateResponseSerializer,
send_headers=False,
json={
"userIdentifier": smartling_settings.USER_IDENTIFIER,
"userSecret": smartling_settings.USER_SECRET,
},
),
)
self._update_tokens(
access_token=data["accessToken"],
refresh_token=data["refreshToken"],
access_token_expires_in=data["expiresIn"],
refresh_token_expires_in=data["refreshExpiresIn"],
token_type=data["tokenType"],
)