diff --git a/src/catalog.rs b/src/catalog.rs
index 1d03734..7d7df1d 100644
--- a/src/catalog.rs
+++ b/src/catalog.rs
@@ -347,6 +347,28 @@ impl Catalog {
};
crate::providers::Provider::from_document(&document, scheme)
}
+ /// Resolves whichever kind of security scheme (OAuth or static apiKey)
+ /// the platform's composed document declares, generically. Callers that
+ /// only work with one kind (e.g. tenant identity, which is OAuth-only)
+ /// keep using `oauth_provider` directly.
+ pub fn security_scheme(
+ &self,
+ platform: &str,
+ ) -> Result {
+ let source = self.get(platform).ok_or("unknown catalog platform")?;
+ let document = serde_yaml::from_str(source).map_err(|_| "invalid catalog document")?;
+ let selection = self.selections.get(platform);
+ let read_selected = |key: &str| -> Result
"));
assert!(!html.contains("as