diff --git a/bioblend/galaxy/__init__.py b/bioblend/galaxy/__init__.py index 2985bcd32..a9c282155 100644 --- a/bioblend/galaxy/__init__.py +++ b/bioblend/galaxy/__init__.py @@ -39,6 +39,7 @@ def __init__( email: Optional[str] = None, password: Optional[str] = None, *, + token: Optional[str] = None, verify: bool = True, ) -> None: """ @@ -79,10 +80,16 @@ def __init__( :param password: Password of Galaxy account corresponding to the above e-mail address. Ignored if key is supplied directly. + :type token: str + :param token: An OIDC access token obtained from an OIDC provider + configured in `oidc_backends_config.xml`. Can be used + as a substitue for an API key. You must make sure the access + token has not expired when making an API call. + :param verify: Whether to verify the server's TLS certificate :type verify: bool """ - super().__init__(url, key=key, email=email, password=password, verify=verify) + super().__init__(url, key=key, email=email, password=password, token=token, verify=verify) self.libraries = libraries.LibraryClient(self) self.histories = histories.HistoryClient(self) self.workflows = workflows.WorkflowClient(self) diff --git a/bioblend/galaxy/objects/galaxy_instance.py b/bioblend/galaxy/objects/galaxy_instance.py index d4baa81d3..4b2577e6e 100644 --- a/bioblend/galaxy/objects/galaxy_instance.py +++ b/bioblend/galaxy/objects/galaxy_instance.py @@ -57,9 +57,12 @@ def __init__( email: Optional[str] = None, password: Optional[str] = None, *, + token: Optional[str] = None, verify: bool = True, ) -> None: - self.gi = bioblend.galaxy.GalaxyInstance(url, key=api_key, email=email, password=password, verify=verify) + self.gi = bioblend.galaxy.GalaxyInstance( + url, key=api_key, email=email, password=password, token=token, verify=verify + ) self.log = bioblend.log self.datasets = client.ObjDatasetClient(self) self.dataset_collections = client.ObjDatasetCollectionClient(self) diff --git a/bioblend/galaxyclient.py b/bioblend/galaxyclient.py index 7c0d8f1ca..a4b110c42 100644 --- a/bioblend/galaxyclient.py +++ b/bioblend/galaxyclient.py @@ -34,10 +34,10 @@ def __init__( self, url: str, key: Optional[str] = None, - token: Optional[str] = None, email: Optional[str] = None, password: Optional[str] = None, *, + token: Optional[str] = None, verify: bool = True, timeout: Optional[float] = None, ) -> None: