Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add correct return type to get_credentials and a_get_credentials #640

Merged
merged 1 commit into from
Feb 23, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/keycloak/keycloak_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,7 @@ def set_user_password(
expected_codes=[HTTP_NO_CONTENT],
)

def get_credentials(self, user_id: str) -> dict:
def get_credentials(self, user_id: str) -> list:
"""
Get user credentials.

Expand All @@ -882,7 +882,7 @@ def get_credentials(self, user_id: str) -> dict:
:param: user_id: user id
:type user_id: str
:returns: Keycloak server response (CredentialRepresentation)
:rtype: dict
:rtype: list
"""
params_path = {"realm-name": self.connection.realm_name, "id": user_id}
data_raw = self.connection.raw_get(
Expand Down Expand Up @@ -6104,7 +6104,7 @@ async def a_set_user_password(
expected_codes=[HTTP_NO_CONTENT],
)

async def a_get_credentials(self, user_id: str) -> dict:
async def a_get_credentials(self, user_id: str) -> list:
"""
Get user credentials asynchronously.

Expand All @@ -6116,7 +6116,7 @@ async def a_get_credentials(self, user_id: str) -> dict:
:param: user_id: user id
:type user_id: str
:returns: Keycloak server response (CredentialRepresentation)
:rtype: dict
:rtype: list
"""
params_path = {"realm-name": self.connection.realm_name, "id": user_id}
data_raw = await self.connection.a_raw_get(
Expand Down