diff options
Diffstat (limited to 'lib/auth-service/src/client/mod.rs')
| -rw-r--r-- | lib/auth-service/src/client/mod.rs | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/lib/auth-service/src/client/mod.rs b/lib/auth-service/src/client/mod.rs index 45260fb..e02672b 100644 --- a/lib/auth-service/src/client/mod.rs +++ b/lib/auth-service/src/client/mod.rs @@ -1,3 +1,6 @@ +pub(crate) mod http; +use std::ops::Deref; + use oauth2::{ AuthUrl, ClientId, ClientSecret, CsrfToken, EndpointNotSet, EndpointSet, RedirectUrl, Scope, TokenUrl, @@ -8,16 +11,24 @@ use url::Url; use crate::{AuthServiceError, Provider}; +type Inner = oauth2::basic::BasicClient< + EndpointSet, + EndpointNotSet, + EndpointNotSet, + EndpointNotSet, + EndpointSet, +>; + #[derive(Debug, Clone)] -pub struct OauthClient( - oauth2::basic::BasicClient< - EndpointSet, - EndpointNotSet, - EndpointNotSet, - EndpointNotSet, - EndpointSet, - >, -); +pub struct OauthClient(Inner); + +impl Deref for OauthClient { + type Target = Inner; + + fn deref(&self) -> &Self::Target { + &self.0 + } +} #[derive(Debug)] pub struct ClientConfig { |
