From de9dea402d69a892aed1713433bef3b7b2c96845 Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Tue, 22 Dec 2015 00:34:06 -0500 Subject: [PATCH] Add derivable Debug implementations --- src/provider.rs | 3 +++ src/token/bearer.rs | 1 + src/token/expiring.rs | 1 + src/token/statik.rs | 1 + 4 files changed, 6 insertions(+) diff --git a/src/provider.rs b/src/provider.rs index 66ecb54..ca86a57 100644 --- a/src/provider.rs +++ b/src/provider.rs @@ -25,6 +25,7 @@ pub trait Provider { /// /// See [Using OAuth 2.0 to Access Google /// APIs](https://developers.google.com/identity/protocols/OAuth2). +#[derive(Debug)] pub struct Google; impl Provider for Google { type Lifetime = Expiring; @@ -36,6 +37,7 @@ impl Provider for Google { /// GitHub OAuth 2.0 provider. /// /// See [OAuth, GitHub Developer Guide](https://developer.github.com/v3/oauth/). +#[derive(Debug)] pub struct GitHub; impl Provider for GitHub { type Lifetime = Static; @@ -47,6 +49,7 @@ impl Provider for GitHub { /// Imgur OAuth 2.0 provider. /// /// See [OAuth 2.0, Imgur](https://api.imgur.com/oauth2). +#[derive(Debug)] pub struct Imgur; impl Provider for Imgur { type Lifetime = Expiring; diff --git a/src/token/bearer.rs b/src/token/bearer.rs index ddd2b8a..3775b0f 100644 --- a/src/token/bearer.rs +++ b/src/token/bearer.rs @@ -5,6 +5,7 @@ use super::{Token, Lifetime}; /// The bearer token type. /// /// See [RFC 6750](http://tools.ietf.org/html/rfc6750). +#[derive(Debug)] pub struct Bearer { access_token: String, scope: Option, diff --git a/src/token/expiring.rs b/src/token/expiring.rs index 4c2ae45..fe88947 100644 --- a/src/token/expiring.rs +++ b/src/token/expiring.rs @@ -3,6 +3,7 @@ use chrono::{DateTime, UTC}; use super::Lifetime; /// An expiring token. +#[derive(Debug)] pub struct Expiring { refresh_token: String, expires: DateTime, diff --git a/src/token/statik.rs b/src/token/statik.rs index 1dbec00..63655fc 100644 --- a/src/token/statik.rs +++ b/src/token/statik.rs @@ -1,6 +1,7 @@ use super::Lifetime; /// A static, non-expiring token. +#[derive(Debug)] pub struct Static; impl Lifetime for Static {