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

Method auth_authorize

crates/opencode-plugin/src/subprocess/client.rs:231–241  ·  view source on GitHub ↗

Trigger OAuth authorization flow.

(
        &self,
        method_index: usize,
        inputs: Option<Value>,
    )

Source from the content-addressed store, hash-verified

229
230 /// Trigger OAuth authorization flow.
231 pub async fn auth_authorize(
232 &self,
233 method_index: usize,
234 inputs: Option<Value>,
235 ) -> Result<AuthorizeResult, PluginSubprocessError> {
236 let params = serde_json::json!({
237 "methodIndex": method_index,
238 "inputs": inputs.unwrap_or(Value::Null),
239 });
240 self.call("auth.authorize", Some(params)).await
241 }
242
243 /// Complete OAuth callback.
244 pub async fn auth_callback(&self, code: Option<&str>) -> Result<Value, PluginSubprocessError> {

Callers 1

authorizeMethod · 0.80

Calls 1

callMethod · 0.80

Tested by

no test coverage detected