Add derivable Debug implementations
This commit is contained in:
parent
7dcc49da8d
commit
de9dea402d
|
@ -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;
|
||||
|
|
|
@ -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>,
|
||||
|
|
|
@ -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>,
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
use super::Lifetime;
|
||||
|
||||
/// A static, non-expiring token.
|
||||
#[derive(Debug)]
|
||||
pub struct Static;
|
||||
|
||||
impl Lifetime for Static {
|
||||
|
|
Loading…
Reference in New Issue