diff --git a/src/client/mod.rs b/src/client/mod.rs index 2d4ff98..237019a 100644 --- a/src/client/mod.rs +++ b/src/client/mod.rs @@ -27,11 +27,12 @@ pub struct Client { /// Redirect URI. pub redirect_uri: Option, - provider: P, + /// The provider. + pub provider: P, } -impl Client

{ - /// Creates a client. +impl Client

{ + /// Creates a client. /// /// # Examples /// @@ -48,7 +49,9 @@ impl Client

{ pub fn new(client_id: String, client_secret: String, redirect_uri: Option) -> Self { Client::with_provider(client_id, client_secret, P::default(), redirect_uri) } +} +impl Client

{ /// Creates a client with a given Provider. Use when the provider needs non-default Initialization. pub fn with_provider( client_id: String, diff --git a/src/provider.rs b/src/provider.rs index f39161f..dae2d5b 100644 --- a/src/provider.rs +++ b/src/provider.rs @@ -3,7 +3,7 @@ use token::{Token, Lifetime, Bearer, Static, Refresh}; /// OAuth 2.0 providers. -pub trait Provider: Default { +pub trait Provider { /// The lifetime of tokens issued by the provider. type Lifetime: Lifetime;