mirror of
https://codeberg.org/pfzetto/axum-oidc
synced 2025-12-08 06:05:16 +01:00
chore!: Remove ref from http_client in constructors
Signed-off-by: MATILLAT Quentin <qmatillat@gmail.com>
This commit is contained in:
parent
2800b88b82
commit
10349c61b5
1 changed files with 4 additions and 5 deletions
|
|
@ -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,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue