Trigger OAuth authorization flow.
(
&self,
method_index: usize,
inputs: Option<Value>,
)
| 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> { |