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
|
/// See [Using OAuth 2.0 to Access Google
|
||||||
/// APIs](https://developers.google.com/identity/protocols/OAuth2).
|
/// APIs](https://developers.google.com/identity/protocols/OAuth2).
|
||||||
|
#[derive(Debug)]
|
||||||
pub struct Google;
|
pub struct Google;
|
||||||
impl Provider for Google {
|
impl Provider for Google {
|
||||||
type Lifetime = Expiring;
|
type Lifetime = Expiring;
|
||||||
|
@ -36,6 +37,7 @@ impl Provider for Google {
|
||||||
/// GitHub OAuth 2.0 provider.
|
/// GitHub OAuth 2.0 provider.
|
||||||
///
|
///
|
||||||
/// See [OAuth, GitHub Developer Guide](https://developer.github.com/v3/oauth/).
|
/// See [OAuth, GitHub Developer Guide](https://developer.github.com/v3/oauth/).
|
||||||
|
#[derive(Debug)]
|
||||||
pub struct GitHub;
|
pub struct GitHub;
|
||||||
impl Provider for GitHub {
|
impl Provider for GitHub {
|
||||||
type Lifetime = Static;
|
type Lifetime = Static;
|
||||||
|
@ -47,6 +49,7 @@ impl Provider for GitHub {
|
||||||
/// Imgur OAuth 2.0 provider.
|
/// Imgur OAuth 2.0 provider.
|
||||||
///
|
///
|
||||||
/// See [OAuth 2.0, Imgur](https://api.imgur.com/oauth2).
|
/// See [OAuth 2.0, Imgur](https://api.imgur.com/oauth2).
|
||||||
|
#[derive(Debug)]
|
||||||
pub struct Imgur;
|
pub struct Imgur;
|
||||||
impl Provider for Imgur {
|
impl Provider for Imgur {
|
||||||
type Lifetime = Expiring;
|
type Lifetime = Expiring;
|
||||||
|
|
|
@ -5,6 +5,7 @@ use super::{Token, Lifetime};
|
||||||
/// The bearer token type.
|
/// The bearer token type.
|
||||||
///
|
///
|
||||||
/// See [RFC 6750](http://tools.ietf.org/html/rfc6750).
|
/// See [RFC 6750](http://tools.ietf.org/html/rfc6750).
|
||||||
|
#[derive(Debug)]
|
||||||
pub struct Bearer<L: Lifetime> {
|
pub struct Bearer<L: Lifetime> {
|
||||||
access_token: String,
|
access_token: String,
|
||||||
scope: Option<String>,
|
scope: Option<String>,
|
||||||
|
|
|
@ -3,6 +3,7 @@ use chrono::{DateTime, UTC};
|
||||||
use super::Lifetime;
|
use super::Lifetime;
|
||||||
|
|
||||||
/// An expiring token.
|
/// An expiring token.
|
||||||
|
#[derive(Debug)]
|
||||||
pub struct Expiring {
|
pub struct Expiring {
|
||||||
refresh_token: String,
|
refresh_token: String,
|
||||||
expires: DateTime<UTC>,
|
expires: DateTime<UTC>,
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
use super::Lifetime;
|
use super::Lifetime;
|
||||||
|
|
||||||
/// A static, non-expiring token.
|
/// A static, non-expiring token.
|
||||||
|
#[derive(Debug)]
|
||||||
pub struct Static;
|
pub struct Static;
|
||||||
|
|
||||||
impl Lifetime for Static {
|
impl Lifetime for Static {
|
||||||
|
|
Loading…
Reference in New Issue