fix: format and lint
CI / Format (push) Successful in 48s
CI / Test (push) Failing after 7m9s
CI / Check (push) Successful in 12m6s
CI / Clippy (push) Successful in 12m10s

This commit is contained in:
Guillaume GRABÉ
2026-06-08 23:51:29 +02:00
parent 6400518beb
commit 1302ce412c
27 changed files with 563 additions and 395 deletions
+14 -4
View File
@@ -179,7 +179,8 @@ impl KeycloakClient {
pub async fn authenticate(&self) -> Result<()> {
info!("Authenticating with Keycloak (client credentials grant)");
let response = self.raw_client
let response = self
.raw_client
.post(&self.token_url)
.form(&[
("grant_type", "client_credentials"),
@@ -222,7 +223,8 @@ impl KeycloakClient {
let url = format!("{}/{}", self.http.base_url(), path.trim_start_matches('/'));
let response = self.raw_client
let response = self
.raw_client
.get(&url)
.header("Authorization", format!("Bearer {}", token))
.header("Accept", "application/json")
@@ -258,7 +260,11 @@ impl KeycloakClient {
first += page_size;
}
info!("Fetched {} users from Keycloak realm '{}'", all_users.len(), self.realm);
info!(
"Fetched {} users from Keycloak realm '{}'",
all_users.len(),
self.realm
);
Ok(all_users)
}
@@ -266,7 +272,11 @@ impl KeycloakClient {
pub async fn fetch_groups(&self) -> Result<Vec<KeycloakGroup>> {
let response = self.get("groups?briefRepresentation=false").await?;
let groups: Vec<KeycloakGroup> = serde_json::from_value(response)?;
info!("Fetched {} top-level groups from Keycloak realm '{}'", groups.len(), self.realm);
info!(
"Fetched {} top-level groups from Keycloak realm '{}'",
groups.len(),
self.realm
);
Ok(groups)
}
+1 -4
View File
@@ -194,10 +194,7 @@ fn build_group_entity(
let mut annotations = HashMap::new();
annotations.insert("keycloak.com/group-id".to_string(), kc_group.id.clone());
annotations.insert(
"keycloak.com/group-path".to_string(),
kc_group.path.clone(),
);
annotations.insert("keycloak.com/group-path".to_string(), kc_group.path.clone());
annotations.insert("keycloak.com/realm".to_string(), config.realm.clone());
annotations.insert(
"keycloak.com/member-count".to_string(),