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 b88dab5 commit 323f455Copy full SHA for 323f455
crates/rmcp/src/transport/auth.rs
@@ -203,7 +203,13 @@ impl AuthorizationManager {
203
pub async fn discover_metadata(&self) -> Result<AuthorizationMetadata, AuthError> {
204
// according to the specification, the metadata should be located at "/.well-known/oauth-authorization-server"
205
let mut discovery_url = self.base_url.clone();
206
- discovery_url.set_path("/.well-known/oauth-authorization-server");
+ let path = discovery_url.path();
207
+ let path_suffix = if path == "/" {
208
+ ""
209
+ } else {
210
+ path
211
+ };
212
+ discovery_url.set_path(&format!("/.well-known/oauth-authorization-server{path_suffix}"));
213
debug!("discovery url: {:?}", discovery_url);
214
let response = self
215
.http_client
0 commit comments