Skip to content

Commit

Permalink
implements response parsing that works for many cases
Browse files Browse the repository at this point in the history
  • Loading branch information
willi-mueller committed May 24, 2024
1 parent e6519c0 commit 1655987
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions dlt/sources/helpers/rest_client/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,13 +187,11 @@ def obtain_token(self) -> None:
def build_access_token_request(self) -> Dict[str, Any]:
pass

@abstractmethod
def parse_expiration_in_seconds(self, response_json: Any) -> int:
pass
return int(response_json.get("expires_in", self.default_token_expiration))

@abstractmethod
def parse_access_token(self, response_json: Any) -> TSecretStrValue:
pass
return str(response_json.get("access_token"))


@configspec
Expand Down

0 comments on commit 1655987

Please sign in to comment.