metasploit/msf/async/
auth.rs

1use crate::client;
2#[path="../blocking/auth.rs"] mod auth;
3use crate::error::Error as E;
4use serde::de::DeserializeOwned as DOwned;
5
6pub async fn logout<T:DOwned>(clientdata:client::Client) -> Result<T,E> {
7    auth::logout(clientdata.clone())
8}
9
10pub async fn add_token<T:DOwned>(clientdata:client::Client,newtokenstr:&str) -> Result<T,E> {
11    auth::add_token(clientdata.clone(),newtokenstr)
12}
13
14pub async fn generate_token<T:DOwned>(clientdata:client::Client) -> Result<T,E> {
15    auth::generate_token(clientdata.clone())
16}
17
18pub async fn list_token<T:DOwned>(clientdata:client::Client) -> Result<T,E> {
19    auth::list_token(clientdata.clone())
20}
21
22pub async fn remove_token<T:DOwned>(clientdata:client::Client,tokenremove:&str) -> Result<T,E> {
23    auth::remove_token(clientdata.clone(),tokenremove)
24}