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

Function plugin_auth_callback

crates/opencode-server/src/routes.rs:4630–4643  ·  view source on GitHub ↗
(
    _state: State<Arc<ServerState>>,
    Path(name): Path<String>,
    Json(req): Json<PluginAuthCallbackRequest>,
)

Source from the content-addressed store, hash-verified

4628}
4629
4630async fn plugin_auth_callback(
4631 _state: State<Arc<ServerState>>,
4632 Path(name): Path<String>,
4633 Json(req): Json<PluginAuthCallbackRequest>,
4634) -> Result<Json<serde_json::Value>> {
4635 let bridge = get_auth_bridge(&name).await?;
4636
4637 let result = bridge
4638 .callback(req.code.as_deref())
4639 .await
4640 .map_err(|e| ApiError::BadRequest(e.to_string()))?;
4641
4642 Ok(Json(result))
4643}
4644
4645#[derive(Debug, Serialize)]
4646struct PluginAuthLoadResponse {

Callers

nothing calls this directly

Calls 2

get_auth_bridgeFunction · 0.85
callbackMethod · 0.45

Tested by

no test coverage detected