Tighten OAuth refresh consistency

This commit is contained in:
fawney19
2026-04-28 09:35:23 +08:00
parent 5311eb0da1
commit 29fc0be121
6 changed files with 322 additions and 19 deletions

View File

@@ -87,7 +87,7 @@ pub(super) async fn parse_admin_provider_oauth_refresh_request(
)));
};
let Some(transport) = state
.read_provider_transport_snapshot(&provider_id, &endpoint.id, &key_id)
.read_provider_transport_snapshot_uncached(&provider_id, &endpoint.id, &key_id)
.await?
else {
return Ok(RefreshDispatch::Respond(response::control_error_response(

View File

@@ -4,6 +4,17 @@ use serde_json::{Map, Value};
use url::Url;
impl<'a> AdminAppState<'a> {
pub(crate) async fn read_provider_transport_snapshot_uncached(
&self,
provider_id: &str,
endpoint_id: &str,
key_id: &str,
) -> Result<Option<AdminGatewayProviderTransportSnapshot>, GatewayError> {
self.app
.read_provider_transport_snapshot_uncached(provider_id, endpoint_id, key_id)
.await
}
pub(crate) async fn read_provider_transport_snapshot(
&self,
provider_id: &str,