We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f8a747e commit 4ee2addCopy full SHA for 4ee2add
crates/rmcp/src/transport/auth.rs
@@ -209,7 +209,11 @@ impl AuthorizationManager {
209
pub async fn discover_metadata(&self) -> Result<AuthorizationMetadata, AuthError> {
210
// according to the specification, the metadata should be located at "/.well-known/oauth-authorization-server"
211
let mut discovery_url = self.base_url.clone();
212
- discovery_url.set_path("/.well-known/oauth-authorization-server");
+ let path = discovery_url.path();
213
+ let path_suffix = if path == "/" { "" } else { path };
214
+ discovery_url.set_path(&format!(
215
+ "/.well-known/oauth-authorization-server{path_suffix}"
216
+ ));
217
debug!("discovery url: {:?}", discovery_url);
218
let response = self
219
.http_client
0 commit comments