From 1b662c867438fa9e36846b2de820ff61815cb2a2 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Mon, 16 Apr 2018 02:16:34 +0200 Subject: [PATCH] chore(oidc): Enable debug log statement for token responses --- src/oidc.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/oidc.rs b/src/oidc.rs index 3ec15854a..8e0f66696 100644 --- a/src/oidc.rs +++ b/src/oidc.rs @@ -120,13 +120,15 @@ impl Handler for OidcExecutor { ("redirect_uri", &self.redirect_uri), ]; - let response: TokenResponse = client.post(&self.oidc_config.token_endpoint) + let mut response = client.post(&self.oidc_config.token_endpoint) .form(¶ms) - .send()? - .json()?; + .send()?; + + debug!("Received token response: {:?}", response); + let token: TokenResponse = response.json()?; let user: Userinfo = client.get(&self.oidc_config.userinfo_endpoint) - .header(Authorization(Bearer { token: response.access_token })) + .header(Authorization(Bearer { token: token.access_token })) .send()? .json()?;