Add derivable Debug implementations

This commit is contained in:
Curtis McEnroe 2015-12-22 00:34:06 -05:00
parent 7dcc49da8d
commit de9dea402d
4 changed files with 6 additions and 0 deletions

View File

@ -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;

View File

@ -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<L: Lifetime> {
access_token: String,
scope: Option<String>,

View File

@ -3,6 +3,7 @@ use chrono::{DateTime, UTC};
use super::Lifetime;
/// An expiring token.
#[derive(Debug)]
pub struct Expiring {
refresh_token: String,
expires: DateTime<UTC>,

View File

@ -1,6 +1,7 @@
use super::Lifetime;
/// A static, non-expiring token.
#[derive(Debug)]
pub struct Static;
impl Lifetime for Static {