diff --git a/clients/python-wrapper/lakefs/client.py b/clients/python-wrapper/lakefs/client.py index 5baa7da05bb..9d80fcf4ce8 100644 --- a/clients/python-wrapper/lakefs/client.py +++ b/clients/python-wrapper/lakefs/client.py @@ -108,14 +108,21 @@ def version(self) -> str: def from_web_identity(code: str, state: str, redirect_uri: str, ttl_seconds: int = 3600, **kwargs) -> Client: """ - Authenticate against lakeFS using a web identity token + Authenticate against lakeFS using a code received from an identity provider + + :param code: The code received from the identity provider + :param state: The state received from the identity provider + :param redirect_uri: The redirect URI used in the authentication process + :param ttl_seconds: The token's time-to-live in seconds + :param kwargs: Remaining arguments for the Client object + :return: The authenticated Client object """ client = Client(**kwargs) sts_requests = lakefs_sdk.StsAuthRequest(code=code, state=state, redirect_uri=redirect_uri, ttl_seconds=ttl_seconds) with api_exception_handler(): auth_token = client.sdk_client.experimental_api.sts_login(sts_requests) - client.config.access_token = auth_token.token - return client + client.config.access_token = auth_token.token + return client class _BaseLakeFSObject: """