Skip to content

Commit 14c3797

Browse files
committed
Checkpoint before follow-up message
1 parent 80c5f8e commit 14c3797

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/webserver/oidc.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,6 @@ fn get_app_host(config: &AppConfig) -> String {
167167
pub struct OidcState {
168168
pub config: Arc<OidcConfig>,
169169
cached_provider: Arc<RwLock<CachedProvider>>,
170-
app_config: Arc<AppConfig>,
171170
}
172171

173172
impl OidcState {
@@ -199,7 +198,7 @@ impl OidcState {
199198
}
200199

201200
/// Refresh provider metadata and client from the OIDC provider
202-
async fn refresh_provider(&self) -> anyhow::Result<()> {
201+
async fn refresh_provider(&self, http_client: &awc::Client) -> anyhow::Result<()> {
203202
let mut cache = self.cached_provider.write().await;
204203

205204
// Double-check we can refresh (another thread might have just done it)
@@ -214,9 +213,8 @@ impl OidcState {
214213
self.config.issuer_url
215214
);
216215

217-
let http_client = make_http_client(&self.app_config)?;
218216
let new_metadata =
219-
discover_provider_metadata(&http_client, self.config.issuer_url.clone()).await?;
217+
discover_provider_metadata(http_client, self.config.issuer_url.clone()).await?;
220218
let new_client = make_oidc_client(&self.config, new_metadata.clone())?;
221219

222220
cache.update(new_client, new_metadata);

0 commit comments

Comments
 (0)