@@ -215,14 +215,15 @@ async def check_oidc_auth(
215
215
return None
216
216
token = login_dict ["token" ]
217
217
218
+ client = self .api ._hs .get_proxied_http_client ()
218
219
oidc = self .config .oidc
219
- oidc_metadata = await get_oidp_metadata (oidc .issuer , self . api . http_client )
220
+ oidc_metadata = await get_oidp_metadata (oidc .issuer , client )
220
221
221
222
# Further validation using token introspection
222
223
data = {"token" : token , "token_type_hint" : "access_token" , "scope" : "openid" }
223
224
224
225
try :
225
- introspection_resp = await self . api . http_client .post_json_get_json (
226
+ introspection_resp = await client .post_json_get_json (
226
227
oidc_metadata .introspection_endpoint ,
227
228
data ,
228
229
headers = basic_auth (oidc .client_id , oidc .client_secret ),
@@ -303,6 +304,8 @@ async def check_custom_flow(
303
304
return None
304
305
token = login_dict ["token" ]
305
306
307
+ client = self .api ._hs .get_proxied_http_client ()
308
+
306
309
check_claims = {}
307
310
308
311
user_id_str = self .api .get_qualified_user_id (username )
@@ -350,7 +353,7 @@ async def check_custom_flow(
350
353
]
351
354
}
352
355
353
- await self . api . http_client .post_json_get_json (
356
+ await client .post_json_get_json (
354
357
self .config .custom_flow .notify_on_registration_uri ,
355
358
{"token" : login_dict ["token" ]},
356
359
headers = headers ,
0 commit comments