From f38ab0cb82b4c90df1381db72bc2c8f842314a88 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Wed, 17 Jan 2024 11:04:29 +0100 Subject: [PATCH] fix: expose getIdToken in python-client --- python-client/wmill/wmill/client.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/python-client/wmill/wmill/client.py b/python-client/wmill/wmill/client.py index b965bd98b9..dcb32d22fb 100644 --- a/python-client/wmill/wmill/client.py +++ b/python-client/wmill/wmill/client.py @@ -575,6 +575,13 @@ def run_script_by_path_sync( ) +@init_global_client +def get_id_token(audience: str) -> str: + """ + Get a JWT token for the given audience for OIDC purposes to login into third parties like AWS, Vault, GCP, etc. + """ + return _client.get_id_token(audience) + @init_global_client def get_job_status(job_id: str) -> JobStatus: return _client.get_job_status(job_id)