baptistegh commented on code in PR #75938: URL: https://github.com/apache/airflow/pull/75938#discussion_r4602339547
########## airflow-ctl/src/airflowctl/ctl/commands/auth_command.py: ########## @@ -40,7 +42,39 @@ ) from airflowctl.api.datamodels.auth_generated import LoginBody from airflowctl.ctl.console_formatting import AirflowConsole -from airflowctl.exceptions import AirflowCtlCredentialInvalidException +from airflowctl.ctl.utils.browser_login import get_authorization_code, resolve_endpoint +from airflowctl.exceptions import ( + AirflowCtlBrowserLoginException, + AirflowCtlCredentialInvalidException, + AirflowCtlKeyringException, +) + + +def _get_token_with_browser(args, api_client: Client, api_url: str) -> str: + """Log in through the browser and return the CLI token, if the API server offers it.""" + api_client.refresh_base_url(base_url=api_url, kind=ClientKind.AUTH) Review Comment: Yes, it's not needed. I will remove it. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
