Skip to content

Commit

Permalink
typo
Browse files Browse the repository at this point in the history
  • Loading branch information
amazy committed May 21, 2024
1 parent b6e71bb commit 8b40914
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sources/orthanc_auth_service/shares/api_keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,15 @@ def get_user_profile_from_api_key(self, api_key: str) -> Optional[UserProfileRes

return response
else:
logging.error("Failed to fetch/search users from api-key from keycloak: " + str(keycloak_response))
logging.error("Failed to fetch/search users from api-key from keycloak: " + str(keycloak_user_response.status_code))
return None

def create_api_keys(keycloak_uri: str, keycloak_admin_uri: str, keycloak_client_secret: str, roles_configuration: RolesConfiguration):
try:
#validate that we can connect to keycloak and retrieve users list
keycloak_users_url = urljoin(keycloak_admin_uri, "users")
headers = {
'Authorization': 'Bearer ' + _get_keycloak_access_token(keycloak_uri, keycloak_client_secret),
'Authorization': 'Bearer ' + _get_keycloak_access_token(keycloak_uri, keycloak_client_secret),
'Content-Type': 'application/json'
}
response = requests.get(keycloak_users_url, headers=headers)
Expand Down

0 comments on commit 8b40914

Please sign in to comment.