Skip to content

Commit 7b1f50d

Browse files
committed
Address review comments
1 parent e9c3944 commit 7b1f50d

File tree

4 files changed

+18
-3
lines changed

4 files changed

+18
-3
lines changed

bioblend/galaxy/__init__.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ def __init__(
3939
email: Optional[str] = None,
4040
password: Optional[str] = None,
4141
*,
42+
token: Optional[str] = None,
4243
verify: bool = True,
4344
) -> None:
4445
"""
@@ -79,10 +80,16 @@ def __init__(
7980
:param password: Password of Galaxy account corresponding to the above
8081
e-mail address. Ignored if key is supplied directly.
8182
83+
:type token: str
84+
:param token: An OIDC access token obtained from an OIDC provider
85+
configured in `oidc_backends_config.xml`. Can be used
86+
as a substitue for an API key. You must make sure the access
87+
token has not expired when making an API call.
88+
8289
:param verify: Whether to verify the server's TLS certificate
8390
:type verify: bool
8491
"""
85-
super().__init__(url, key=key, email=email, password=password, verify=verify)
92+
super().__init__(url, key=key, email=email, password=password, token=token, verify=verify)
8693
self.libraries = libraries.LibraryClient(self)
8794
self.histories = histories.HistoryClient(self)
8895
self.workflows = workflows.WorkflowClient(self)

bioblend/galaxy/objects/galaxy_instance.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,12 @@ def __init__(
5757
email: Optional[str] = None,
5858
password: Optional[str] = None,
5959
*,
60+
token: Optional[str] = None,
6061
verify: bool = True,
6162
) -> None:
62-
self.gi = bioblend.galaxy.GalaxyInstance(url, key=api_key, email=email, password=password, verify=verify)
63+
self.gi = bioblend.galaxy.GalaxyInstance(
64+
url, key=api_key, email=email, password=password, token=token, verify=verify
65+
)
6366
self.log = bioblend.log
6467
self.datasets = client.ObjDatasetClient(self)
6568
self.dataset_collections = client.ObjDatasetCollectionClient(self)

bioblend/galaxyclient.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ def __init__(
3434
self,
3535
url: str,
3636
key: Optional[str] = None,
37-
token: Optional[str] = None,
3837
email: Optional[str] = None,
3938
password: Optional[str] = None,
4039
*,
40+
token: Optional[str] = None,
4141
verify: bool = True,
4242
timeout: Optional[float] = None,
4343
) -> None:

bioblend/toolshed/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ def __init__(
5757
:param password: Password of ToolShed account corresponding to the above
5858
e-mail address. Ignored if key is supplied directly.
5959
60+
:param token: An OIDC access token obtained from an OIDC provider
61+
configured in `oidc_backends_config.xml`. Can be used
62+
as a substitue for an API key. You must make sure the access
63+
token has not expired when making an API call.
64+
6065
:param verify: Whether to verify the server's TLS certificate
6166
:type verify: bool
6267
"""

0 commit comments

Comments
 (0)