diff options
| author | rtkay123 <dev@kanjala.com> | 2026-02-09 13:25:17 +0200 |
|---|---|---|
| committer | rtkay123 <dev@kanjala.com> | 2026-02-09 13:25:17 +0200 |
| commit | bac76a98bf4e90610d0a7105d2ebe6872dc147d4 (patch) | |
| tree | 341a1a31bd20741f781d48e01f7ded253bf34caf /lib/auth-service/src/client/mod.rs | |
| parent | 253c5631ae09fd5ad9fd6b3eff104e6099d4676c (diff) | |
| download | sellershut-bac76a98bf4e90610d0a7105d2ebe6872dc147d4.tar.bz2 sellershut-bac76a98bf4e90610d0a7105d2ebe6872dc147d4.zip | |
feat: svc crate
Diffstat (limited to 'lib/auth-service/src/client/mod.rs')
| -rw-r--r-- | lib/auth-service/src/client/mod.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/auth-service/src/client/mod.rs b/lib/auth-service/src/client/mod.rs index af581b0..45e7e4d 100644 --- a/lib/auth-service/src/client/mod.rs +++ b/lib/auth-service/src/client/mod.rs @@ -5,6 +5,7 @@ use url::Url; use crate::AuthServiceError; +#[derive(Debug, Clone)] pub struct OauthClient( oauth2::basic::BasicClient< EndpointSet, @@ -38,10 +39,10 @@ impl ClientConfig { } } -impl TryFrom<ClientConfig> for OauthClient { +impl TryFrom<&ClientConfig> for OauthClient { type Error = AuthServiceError; - fn try_from(value: ClientConfig) -> Result<Self, Self::Error> { + fn try_from(value: &ClientConfig) -> Result<Self, Self::Error> { debug!("creating oauth client"); Ok(Self( oauth2::basic::BasicClient::new(ClientId::new(value.client_id.to_string())) |
