chore!: Remove ref from http_client in constructors

Signed-off-by: MATILLAT Quentin <qmatillat@gmail.com>
This commit is contained in:
MATILLAT Quentin 2025-01-29 15:03:53 +01:00
parent 2800b88b82
commit 10349c61b5
No known key found for this signature in database
GPG key ID: B9BAF56E288158D2

View file

@ -184,7 +184,7 @@ impl<AC: AdditionalClaims> OidcClient<AC> {
client_id, client_id,
client_secret, client_secret,
scopes, scopes,
&client, client,
) )
.await .await
} }
@ -198,18 +198,17 @@ impl<AC: AdditionalClaims> OidcClient<AC> {
client_id: String, client_id: String,
client_secret: Option<String>, client_secret: Option<String>,
scopes: Vec<String>, scopes: Vec<String>,
//TODO remove borrow with next breaking version client: reqwest::Client,
client: &reqwest::Client,
) -> Result<Self, Error> { ) -> Result<Self, Error> {
let provider_metadata = let provider_metadata =
ProviderMetadata::discover_async(IssuerUrl::new(issuer)?, client).await?; ProviderMetadata::discover_async(IssuerUrl::new(issuer)?, &client).await?;
Self::from_provider_metadata_and_client( Self::from_provider_metadata_and_client(
provider_metadata, provider_metadata,
application_base_url, application_base_url,
client_id, client_id,
client_secret, client_secret,
scopes, scopes,
client.clone(), client,
) )
} }
} }