about summary refs log tree commit diff
path: root/src/oidc.rs
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@gmail.com>2018-04-16T00·16+0200
committerVincent Ambo <tazjin@gmail.com>2018-04-16T00·16+0200
commit1b662c867438fa9e36846b2de820ff61815cb2a2 (patch)
tree2b030e092ba299001f2aa7c16af32155adcabe23 /src/oidc.rs
parent985ca0a3e58fa548ea3c3eb9e69f99b758001a7e (diff)
chore(oidc): Enable debug log statement for token responses
Diffstat (limited to 'src/oidc.rs')
-rw-r--r--src/oidc.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/oidc.rs b/src/oidc.rs
index 3ec15854a8b2..8e0f66696083 100644
--- a/src/oidc.rs
+++ b/src/oidc.rs
@@ -120,13 +120,15 @@ impl Handler<RetrieveToken> 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(&params)
-            .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()?;