Skip to content

Commit 261df99

Browse files
committed
remove comments
1 parent fc7b35a commit 261df99

File tree

1 file changed

+2
-9
lines changed
  • rust/user-info-fetcher/src/backend

1 file changed

+2
-9
lines changed

rust/user-info-fetcher/src/backend/entra.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,6 @@ struct OAuthResponse {
4848
access_token: String,
4949
}
5050

51-
/// The minimal structure of [UserRepresentation] that is returned by [`/users`][users] and [`/users/{id}`][user-by-id].
52-
/// <div class="warning">Some fields, such as `groups` are never present. See [keycloak/keycloak#20292][issue-20292]</div>
53-
///
54-
/// [users]: https://www.keycloak.org/docs-api/22.0.1/rest-api/index.html#_get_adminrealmsrealmusers
55-
/// [user-by-id]: https://www.keycloak.org/docs-api/22.0.1/rest-api/index.html#_get_adminrealmsrealmusersid
56-
/// [UserRepresentation]: https://www.keycloak.org/docs-api/22.0.1/rest-api/index.html#UserRepresentation
57-
/// [issue-20292]: https://github.com/keycloak/keycloak/issues/20294
5851
#[derive(Clone, Deserialize)]
5952
#[serde(rename_all = "camelCase")]
6053
struct UserMetadata {
@@ -91,7 +84,7 @@ pub(crate) async fn get_user_info(
9184
tls,
9285
} = config;
9386

94-
let entra_endpoint = EntraEndpoint::new(hostname.clone(), port.clone(), tenant_id.clone(), tls);
87+
let entra_endpoint = EntraEndpoint::new(hostname.clone(), *port, tenant_id.clone(), tls);
9588
let token_url = entra_endpoint.oauth2_token();
9689

9790
let authn = send_json_request::<OAuthResponse>(http.post(token_url).form(&[
@@ -116,7 +109,7 @@ pub(crate) async fn get_user_info(
116109
UserInfoRequest::UserInfoRequestByName(req) => {
117110
let username = &req.username;
118111
send_json_request::<UserMetadata>(
119-
http.get(entra_endpoint.user_info(&username))
112+
http.get(entra_endpoint.user_info(username))
120113
.bearer_auth(&authn.access_token),
121114
)
122115
.await

0 commit comments

Comments
 (0)