Skip to content

Commit

Permalink
docs: comment on api.setup_authenticated_client
Browse files Browse the repository at this point in the history
  • Loading branch information
evilsocket committed Oct 16, 2024
1 parent 6a9f03d commit 3f21bcd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dreadnode_cli/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@ async def list_challenges(self) -> Any:


async def setup_authenticated_client(config: ServerConfig, force_refresh: bool = False) -> Client:
"""Create an API client and refresh the authentication data if it is close to expiry."""

# load existing auth data
auth = Authentication(config.access_token, config.refresh_token)
client = Client(base_url=config.url, auth=auth)
Expand Down

0 comments on commit 3f21bcd

Please sign in to comment.