Skip to content

Commit 1eb1ada

Browse files
committed
chore(app): trace-log user claims on success
Signed-off-by: Roman Volosatovs <[email protected]>
1 parent 3e582fa commit 1eb1ada

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

crates/app/src/auth/oidc.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,15 @@ impl<B: Send> FromRequest<B> for Claims {
101101
})?;
102102

103103
trace!(target: "app:auth::oidc", "request user info");
104-
info_req.request(http_client).map(Self).map_err(|e| {
104+
let claims = info_req.request(http_client).map_err(|e| {
105105
debug!(target: "app::auth::oidc", "failed to request user info: {e}");
106106
(
107107
StatusCode::UNAUTHORIZED,
108108
format!("OpenID Connect credential validation failed: {e}"),
109109
)
110110
.into_response()
111-
})
111+
})?;
112+
trace!(target: "app:auth::oidc", "received user claims: {:?}", claims);
113+
Ok(Self(claims))
112114
}
113115
}

0 commit comments

Comments
 (0)