MCPcopy Index your code
hub / github.com/ChrisFeldmeier/OpenCodeRust / list_plugin_auth

Function list_plugin_auth

crates/opencode-server/src/routes.rs:4568–4590  ·  view source on GitHub ↗
(_state: State<Arc<ServerState>>)

Source from the content-addressed store, hash-verified

4566}
4567
4568async fn list_plugin_auth(_state: State<Arc<ServerState>>) -> Result<Json<Vec<PluginAuthInfo>>> {
4569 let Some(loader) = get_plugin_loader() else {
4570 return Ok(Json(Vec::new()));
4571 };
4572
4573 let bridges = loader.auth_bridges().await;
4574 let result: Vec<PluginAuthInfo> = bridges
4575 .values()
4576 .map(|bridge| PluginAuthInfo {
4577 provider: bridge.provider().to_string(),
4578 methods: bridge
4579 .methods()
4580 .iter()
4581 .map(|m| PluginAuthMethodInfo {
4582 method_type: m.method_type.clone(),
4583 label: m.label.clone(),
4584 })
4585 .collect(),
4586 })
4587 .collect();
4588
4589 Ok(Json(result))
4590}
4591
4592#[derive(Debug, Deserialize)]
4593struct PluginAuthAuthorizeRequest {

Callers

nothing calls this directly

Calls 6

get_plugin_loaderFunction · 0.85
newFunction · 0.85
auth_bridgesMethod · 0.80
providerMethod · 0.80
methodsMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected