(
socket: SocketRef,
socketioxide::extract::State(plugin): socketioxide::extract::State<Plugin<PluginState>>,
)
| 573 | } |
| 574 | |
| 575 | pub async fn auth_socket_io_middleware( |
| 576 | socket: SocketRef, |
| 577 | socketioxide::extract::State(plugin): socketioxide::extract::State<Plugin<PluginState>>, |
| 578 | ) -> Result<(), AppError> { |
| 579 | let rune = socket |
| 580 | .req_parts() |
| 581 | .headers |
| 582 | .get("rune") |
| 583 | .and_then(|v| v.to_str().ok()) |
| 584 | .map(String::from); |
| 585 | |
| 586 | let checkrune_params = CheckRuneParams { |
| 587 | nodeid: None, |
| 588 | method: Some("listclnrest-notifications".to_owned()), |
| 589 | params: None, |
| 590 | }; |
| 591 | verify_rune(&plugin, rune, &checkrune_params).await |
| 592 | } |
nothing calls this directly
no test coverage detected