Skip to content

Commit 782954d

Browse files
authored
Add GET methods for TPAs (#120)
* feat: add GET methods for TPAs * add new multipass grant type
1 parent 3b8be90 commit 782954d

2 files changed

Lines changed: 25 additions & 1 deletion

File tree

libs/foundry-dev-tools/src/foundry_dev_tools/clients/multipass.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1459,3 +1459,27 @@ def api_get_ttl(self) -> requests.Response:
14591459
the response contains the remaining lifetime (in seconds) of the token until it expires
14601460
"""
14611461
return self.api_request("GET", "token/ttl")
1462+
1463+
def api_get_third_party_application_installation(
1464+
self,
1465+
client_id: str,
1466+
) -> requests.Response:
1467+
"""Returns the installation information for the organization.
1468+
1469+
Returns:
1470+
requests.Response:
1471+
the response
1472+
"""
1473+
return self.api_request("GET", f"client-installations/{client_id}")
1474+
1475+
def api_get_third_party_application(
1476+
self,
1477+
client_id: str,
1478+
) -> requests.Response:
1479+
"""Returns the client information.
1480+
1481+
Returns:
1482+
requests.Response:
1483+
the response
1484+
"""
1485+
return self.api_request("GET", f"clients/{client_id}")

libs/foundry-dev-tools/src/foundry_dev_tools/utils/api_types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def assert_in_literal(option, literal, variable_name) -> None: # noqa: ANN001
108108
MultipassClientType = Literal["CONFIDENTIAL", "PUBLIC"]
109109
"""Multipass client types."""
110110

111-
MultipassGrantType = Literal["AUTHORIZATION_CODE", "CLIENT_CREDENTIALS", "REFRESH_TOKEN"]
111+
MultipassGrantType = Literal["AUTHORIZATION_CODE", "CLIENT_CREDENTIALS", "REFRESH_TOKEN", "JWT_BEARER"]
112112
"""Multipass grant types."""
113113

114114
ResourceDecoration = Literal[

0 commit comments

Comments
 (0)