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_secret,
scopes,
&client,
client,
)
.await
}
@ -198,18 +198,17 @@ impl<AC: AdditionalClaims> OidcClient<AC> {
client_id: String,
client_secret: Option<String>,
scopes: Vec<String>,
//TODO remove borrow with next breaking version
client: &reqwest::Client,
client: reqwest::Client,
) -> Result<Self, Error> {
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(
provider_metadata,
application_base_url,
client_id,
client_secret,
scopes,
client.clone(),
client,
)
}
}