You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-11-20 12:02:22 +03:00
Replace the OTEL-based tracing layer with tracing based layers
This commit is contained in:
@@ -78,9 +78,7 @@ pub(crate) async fn get(
|
||||
.await?
|
||||
.ok_or(RouteError::ProviderNotFound)?;
|
||||
|
||||
let http_service = http_client_factory
|
||||
.http_service("upstream-discover")
|
||||
.await?;
|
||||
let http_service = http_client_factory.http_service().await?;
|
||||
|
||||
// First, discover the provider
|
||||
let metadata =
|
||||
|
||||
@@ -184,19 +184,13 @@ pub(crate) async fn get(
|
||||
CodeOrError::Code { code } => code,
|
||||
};
|
||||
|
||||
let http_service = http_client_factory
|
||||
.http_service("upstream-discover")
|
||||
.await?;
|
||||
let http_service = http_client_factory.http_service().await?;
|
||||
|
||||
// XXX: we shouldn't discover on-the-fly
|
||||
// Discover the provider
|
||||
let metadata =
|
||||
mas_oidc_client::requests::discovery::discover(&http_service, &provider.issuer).await?;
|
||||
|
||||
let http_service = http_client_factory
|
||||
.http_service("upstream-fetch-jwks")
|
||||
.await?;
|
||||
|
||||
// Fetch the JWKS
|
||||
let jwks =
|
||||
mas_oidc_client::requests::jose::fetch_jwks(&http_service, metadata.jwks_uri()).await?;
|
||||
@@ -227,10 +221,6 @@ pub(crate) async fn get(
|
||||
client_id: &provider.client_id,
|
||||
};
|
||||
|
||||
let http_service = http_client_factory
|
||||
.http_service("upstream-exchange-code")
|
||||
.await?;
|
||||
|
||||
let (response, id_token) =
|
||||
mas_oidc_client::requests::authorization_code::access_token_with_authorization_code(
|
||||
&http_service,
|
||||
|
||||
Reference in New Issue
Block a user