mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-14 02:55:47 -04:00
chore: remove Client::authentication_server_info as it's duplicated from Oidc::authentication_server_info
This commit is contained in:
@@ -328,7 +328,7 @@ impl Client {
|
||||
/// OpenID Connect and this `Client` was constructed using auto-discovery by
|
||||
/// setting the homeserver with [`ClientBuilder::server_name()`].
|
||||
pub(crate) fn discovered_authentication_server(&self) -> Option<AuthenticationServerInfo> {
|
||||
self.inner.authentication_server_info().cloned()
|
||||
self.inner.oidc().authentication_server_info().cloned()
|
||||
}
|
||||
|
||||
/// The sliding sync proxy that is trusted by the homeserver. `None` when
|
||||
|
||||
@@ -23,6 +23,7 @@ use crate::oidc::{self, Oidc, OidcAuthData};
|
||||
/// children.
|
||||
pub(crate) struct AuthCtx {
|
||||
/// The authentication server info discovered from the homeserver.
|
||||
#[cfg_attr(not(feature = "experimental-oidc"), allow(dead_code))]
|
||||
pub(crate) authentication_server_info: Option<AuthenticationServerInfo>,
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,6 @@ use ruma::{
|
||||
device::{delete_devices, get_devices, update_device},
|
||||
directory::{get_public_rooms, get_public_rooms_filtered},
|
||||
discovery::{
|
||||
discover_homeserver::AuthenticationServerInfo,
|
||||
get_capabilities::{self, Capabilities},
|
||||
get_supported_versions,
|
||||
},
|
||||
@@ -371,18 +370,6 @@ impl Client {
|
||||
self.inner.homeserver.read().await.clone()
|
||||
}
|
||||
|
||||
/// The authentication server info discovered from the homeserver.
|
||||
///
|
||||
/// This will only be set if the homeserver supports authenticating via
|
||||
/// OpenID Connect ([MSC3861]) and this `Client` was constructed using
|
||||
/// auto-discovery by setting the homeserver with
|
||||
/// [`ClientBuilder::server_name()`].
|
||||
///
|
||||
/// [MSC3861]: https://github.com/matrix-org/matrix-spec-proposals/pull/3861
|
||||
pub fn authentication_server_info(&self) -> Option<&AuthenticationServerInfo> {
|
||||
self.inner.auth_ctx.authentication_server_info.as_ref()
|
||||
}
|
||||
|
||||
/// The sliding sync proxy that is trusted by the homeserver.
|
||||
#[cfg(feature = "experimental-sliding-sync")]
|
||||
pub fn sliding_sync_proxy(&self) -> Option<Url> {
|
||||
|
||||
@@ -552,7 +552,7 @@ async fn build_client(
|
||||
// Check if the homeserver advertises an OIDC Provider with auto-discovery.
|
||||
// This can be bypassed by providing the issuer manually, but it should be the
|
||||
// most common case for public homeservers.
|
||||
if let Some(issuer_info) = client.authentication_server_info().cloned() {
|
||||
if let Some(issuer_info) = client.oidc().authentication_server_info().cloned() {
|
||||
println!("Found issuer: {}", issuer_info.issuer);
|
||||
|
||||
let homeserver = client.homeserver().await.to_string();
|
||||
|
||||
Reference in New Issue
Block a user