Skip to content

Commit 1e9f907

Browse files
fix: Removing the pilot login cli
1 parent 3f7c632 commit 1e9f907

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

diracx-cli/src/diracx/cli/auth.py

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -144,24 +144,3 @@ async def logout():
144144
def callback(output_format: Optional[str] = None):
145145
if output_format is not None:
146146
os.environ["DIRACX_OUTPUT_FORMAT"] = output_format
147-
148-
149-
@app.async_command()
150-
async def pilot_login(
151-
pilot_reference: str = typer.Argument(None, help="Pilot job reference."),
152-
pilot_secret: str = typer.Argument(None, help="Pilot secret given by DiracX."),
153-
):
154-
"""Login to the DIRAC system using a pilot exchange (a [reference,secret] pair)."""
155-
async with AsyncDiracClient() as api:
156-
157-
try:
158-
response = await api.auth.pilot_login(pilot_job_reference=pilot_reference, pilot_secret=pilot_secret) # type: ignore
159-
except Exception as e:
160-
print(f"Error signing in DiracX {e!r}")
161-
return
162-
163-
# Save credentials
164-
write_credentials(response) # type: ignore
165-
credentials_path = get_diracx_preferences().credentials_path
166-
print(f"Saved credentials to {credentials_path}")
167-
print("\nLogin successful!")

0 commit comments

Comments
 (0)